I have an MDB file I access using OleDB:
OleDbConnection connection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Database.mdb;Persist Security Info=True");
And try to create a new row in a table Users
:
connection.Open();
OleDbCommand cmd = new OleDbCommand("INSERT INTO `users` (`name`, `password`) VALUES ('asd', 'asd')", connection);
cmd.ExecuteNonQuery();
connection.Close();
But nothing happens. I don't get an error message or exceptions, it runs without problems. But when I check the database after the program finished, the table still is empty.
(I already tried the same using DataSets and TableAdapters, but the same happened there: http://stackoverflow.com/questions/3334632/inserting-not-commited-to-database)