-
You must use BeginTrans, CommitTrans, Rollback. After the BeginTrans method starts a transaction that isolates all the changes made to the database, the CommitTrans method saves the changes. You can use the Rollback method to undo changes that you saved using the Update method.
For sample:
Dim cnn1 As ADODB.Connection
' Open connection...
' Start a transaction.
cnn1.BeginTrans
' Change database...
' Ask if the user wants to commit to all the changes made above.
If MsgBox("Save all changes?", vbYesNo) = vbYes Then
cnn1.CommitTrans
Else
cnn1.RollbackTrans
End If
Best regards.
------------------
smalig
[email protected]
smalig.tripod.com
-
I use ADO to retrieve data from an Oracle database. Sometimes queries last for ever and everything in the application is frozen.
Is there any way to execute a query in the background ? And maybe to create an 'Abort' button.
Thanks for any input...
Francis
-
Transactions do not run in the background, that is a separate data protection feature altogether. Check out using asynchronous querys in MSDN -- it will send the query to the db and immediately execute the next statement -- you declare ADO connection using the WithEvents keyword to receive event notification
[This message has been edited by Clunietp (edited 11-03-1999).]
[This message has been edited by Clunietp (edited 11-03-1999).]
-
Thanks for the help.
I have one last question though. To query from my db, I use a tool called GQL. It has an 'Abort query' button and also seems to displays data as it is coming back.
Any ideas on how this is done ?
-
Use the events of your ADO to monitor number of records as they are delivered - FetchProgress & FetchComplete