ADO Recordset not showing changes just made...
-
I've noticed that sometimes when saving data to a (JET) database while using ADO, a query performed right after the changes may not contain the changes....in particular if you have more than a single connection object to the same database. I've played with events to make sure that the data is actually commited to the database (the CommitTransComplete method is getting called), but haven't found any solution except to hard-code a wait which I suspect is a very very bad idea. Anyone have any ideas or know have an idea what I'm fighting against?? Thanks! Paul
-
I've noticed that sometimes when saving data to a (JET) database while using ADO, a query performed right after the changes may not contain the changes....in particular if you have more than a single connection object to the same database. I've played with events to make sure that the data is actually commited to the database (the CommitTransComplete method is getting called), but haven't found any solution except to hard-code a wait which I suspect is a very very bad idea. Anyone have any ideas or know have an idea what I'm fighting against?? Thanks! Paul
my understanding is that changes are not broadcast across multiple connections as the potential traffic on the network (in a multiuser scenario) would be grim the solution we came up with was either to build in an auto-refresh every minute or two, or to give the users a refresh button on the data entry screens sql server works this way to in fact mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
-
my understanding is that changes are not broadcast across multiple connections as the potential traffic on the network (in a multiuser scenario) would be grim the solution we came up with was either to build in an auto-refresh every minute or two, or to give the users a refresh button on the data entry screens sql server works this way to in fact mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
The information seems to be available within a few seconds (somewhere between 2 and 4 seconds) so refreshing every minute wouldn't really help any....and I need the data within a second of having saved it to the database. I don't want to hardcode a wait into the application, and the whole point of the current set of work that I'm doing is to optimize for speed....having just saved the user 10 seconds, I'd hate to have to give half of it away waiting for data. I've come across a Q article which indicates that Jet has "lazy" writes and caches information within the connection. I've set a connection property that is suposed to make sure that transaction data is to be saved right to the file, but haven't found any way of making sure that the other connection's cache is refreshed. ;( Paul
-
The information seems to be available within a few seconds (somewhere between 2 and 4 seconds) so refreshing every minute wouldn't really help any....and I need the data within a second of having saved it to the database. I don't want to hardcode a wait into the application, and the whole point of the current set of work that I'm doing is to optimize for speed....having just saved the user 10 seconds, I'd hate to have to give half of it away waiting for data. I've come across a Q article which indicates that Jet has "lazy" writes and caches information within the connection. I've set a connection property that is suposed to make sure that transaction data is to be saved right to the file, but haven't found any way of making sure that the other connection's cache is refreshed. ;( Paul
I had the same problem a couple of months ago with an Access 2000 database and ADO. The solution looks like the following: pConnection->BeginTrans(); //modify data base in some method pConnection->CommitTrans(); After CommitTrans() other connections will see the change that occurred between BeginTrans and CommitTrans. This will flush the result back to the database. There is an article in the MSDN library that explains transactions in ADO. Search MSDN for "Using Transactions in Your Solutions" as an exact phrase. There should be one article, its in Visual Basic but the solution is similar in VC++. John