P
Patrick Fryer via .NET 247
I?m doing some work on a project which involves accessing a largeAccess database (about 850Mb)
The problem is when I?m doing an update/insert into the databasethe oleDbCommand.executeNonQuery() method seems to return beforeAccess has committed the change ? This means that a display Ihave on screen which reads back what has just been ?inserted?doesn?t work correctly.
At first the problem was only intermittent but as the databasehas grown it seems to happen all the time. It does work okay ifI step through the program in Visual Studio (thus introducing anartificial delay). Does anyone know a way around this? Somewayfor the code to block until the operation has been committed? Ican?t seem to find info about this online. If I make the threadsleep for 500 MS after performing the insert it's okay as well?
Is there a connection string parameter or something I can use?Our customer wants to stick with MS Access for now although theywant to upgrade to SQL Server later.
Thanks. Patrick.
The problem is when I?m doing an update/insert into the databasethe oleDbCommand.executeNonQuery() method seems to return beforeAccess has committed the change ? This means that a display Ihave on screen which reads back what has just been ?inserted?doesn?t work correctly.
At first the problem was only intermittent but as the databasehas grown it seems to happen all the time. It does work okay ifI step through the program in Visual Studio (thus introducing anartificial delay). Does anyone know a way around this? Somewayfor the code to block until the operation has been committed? Ican?t seem to find info about this online. If I make the threadsleep for 500 MS after performing the insert it's okay as well?
Is there a connection string parameter or something I can use?Our customer wants to stick with MS Access for now although theywant to upgrade to SQL Server later.
Thanks. Patrick.