v-wywang
1/11/2008 10:02:00 AM
Hello Jeff,
Thanks for your reply.
I have reproduced the issue on my side. Apparently, you didn't close the
connection after you deleted recodes from Access Database. I believe this
results the second connection return the wrong data from Access Database.
Is it possible to close it after executing deleteCommand?
public static bool DeleteRecord(JDiaryRecord diaryRecord)
{
.........
try
{
m_OleDbDataAdapter.DeleteCommand.ExecuteNonQuery();
// please add the following line
m_OleDbDataAdapter.DeleteCommand.Connection.Close();
return true;
}
.........
}
On my side, the issue goes away after I closed the connection. Please try
it and let me know if this works fine on your side. We are glad to assist
you.
Have a great day,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.