i'm trying to add a new row to my datatable.
I've no error while running this code but nothing happened in my table.
Here's my code :
string table = "`DONNEE ENTRANT`";
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * From " + table, _conn);
OleDbCommandBuilder cmdBuilder = new OleDbCommandBuilder(adapter);
DataTable dataTable = new DataTable(table);
DataRow row = dataTable.NewRow();
row["CODE LIAISON"] = "TEST";
Any idea what i'm doing wrong (in this way, I know that we can run command with oleDb but really don't like this way ...).
Based on what you're doing it appears you want that new row to end up in the database. So remove this line:
because that's changing the
Unchanged and you need it left at
Added. Further, you need to make sure that your
adapter has an
InsertStatement defined so it can use it.
I would use  instead of `` but I believe the answer to correct your problem was already given by @Michael Perrenoud