HI,
I am making a Windows Application in C#. NET. When I insert a record in MS-Access Datab开发者_如何学Pythonase. It shows that the record is saved, No Errors Occur. But When I reload the project, the record which I added is not found in Database. Please help.
Here is the Code, I am using:
DataSet ds13 = new DataSet();
OleDbDataReader dr13;
OleDbCommand cmd13 = new OleDbCommand();
cmd13.CommandType = CommandType.Text;
cmd13.CommandText = "INSERT INTO Due_Party VALUES(@A,@B,@C,@D,@E,@F,@G)";
cmd13.Parameters.Add("@A", SqlDbType.Text).Value = textBox11.Text;
con.ConnectionString = constr;
cmd13.Connection = con;
con.Open();
cmd13.ExecuteNonQuery();
con.Close();
Regards Sunil Kumar
How long after the insert are you checking? I only ask because something sticks in my mind about delayed writes when using ADO. But before I go 'a' googling can you let me know
EDIT: Ok it might be the same kind of thing as this
http://support.microsoft.com/kb/200300
I know that is talking about ADO and not ADO.Net but the idea might be the same. Does the record show up if you check again later?
精彩评论