ADO hanging waiting for Oracle commit 
Author Message
 ADO hanging waiting for Oracle commit

I'm porting a VB/ADO app from SQLServer to Oracle.  So far it's gone
surprisingly well.

One issue I've found is that if I maintain some data in Oracle through
a sql tool and forget to issue a commit, the VB program hangs when it
tries to update the same data.

I would hope that I would get an error message at this point, rather
that just have it hang.
Would anybody know if there are any ADO properties that could change
and detect the error condition?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 21 Apr 2003 02:52:56 GMT  
 ADO hanging waiting for Oracle commit

You may have a couple of options.  When you open a recordset, there are
options regarding locking, one of these may do it for you.  Also, you can
try to lock the rows you are going to update first, by selecting them and
using the FOR UPDATE clause.  Use FOR UPDATE NO WAIT if you want Oracle to
return an error if the lock cannot be obtained.

The problem, as you may have guessed, is not that ADO is{*filter*}, but that
Oracle has the second transaction waiting for the first to complete.

By the way, this can happen also when inserting rows, in any case where
Oracle has to wait to determine whether or not a unique constraint violation
should be raised (trx a inserts id=1, and doesn't commit, trx b inserts
id=1.  If trx a rollsback, b continues, if a commits, b gets a unique const.
violation).

Regards,
Kevin Braun



Tue, 22 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Oracle commits vs Sybase/SQL-Server commits

2. Oracle ODBC (Native) and Visual Basic ADO 2.5 Timeouts and Hanging Clients

3. VB hangs in ADO/OLE DB/Oracle project

4. oracle + ADO 2.1.1, empty string to varchar2 in parameter - HANG

5. Transactions waiting to be committed

6. Using commit/rollback with Oracle and RDO

7. oracle connected via odbc commits implicitly

8. RDO and Committing to Oracle

9. Oracle: Need commit?

10. App hangs waiting for RDO Error Message

11. Waiting.......waiting.....waiting....

12. ADO err with trans begin/commit ?

 

 
Powered by phpBB® Forum Software