PDA

View Full Version : OCI 21500 exception



sabyasachin
06-02-2013, 11:25 PM
I am getting OCI-21500 exception in my C++ code where I use RWDBConnection to connect oracle 11g.

My question is what exception can I catch if somehow it happens to use the same connection.

I using a code snippet like this:


newConnection.beginTransaction();
RWDBResult myResult=newConnection.executeSql(mySql);

RWDBTable myTable=myResult.table();

RWDBReader rdbReader = myTable.reader(newConnection);

Where "newConnection" is a RWDBConnection variable already having a valid connection, but may be used by another thread.

Can anybody please advise.

Saby

gtruong_rw
06-03-2013, 03:01 PM
The best approach is to lock the connection until the execution is finished and then release the connection so other threads can have access to it.

http://www.roguewave.com/portals/0/products/sourcepro/docs/12.0/html/dbcoreug/11-4.html

Giai Truong
Rogue Wave Software
5500 Flatiron Parkway, Suite 200, Boulder, CO 80301
| P 303.545.3205 | US 800.404.4767 | F 303.473.9137 |
support@roguewave.com
www.roguewave.com/support

sabyasachin
06-11-2013, 02:37 AM
Thanks Giai.

Saby