Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re:RE: Checking if Oracle Connection still valid
Kevin,
Very true, I remember it from way back in 85 on Version 4 of Oracle. The problem with sqlca and OCI is that it's "not required" and therefore often left out.
Dick Goulet
____________________Reply Separator____________________ Author: Kevin Lange <kgel_at_ppoone.com> Date: 8/15/2001 8:50 AM
sqlca has been around for a LONG LONG time. I used it years ago with my COBOL SQL Reports. Its the SQL Communications Area.
-----Original Message-----
Sent: Wednesday, August 15, 2001 10:02 AM
To: Multiple recipients of list ORACLE-L
Yusron,
One item I have noted from those who love OCI is that they rarely if
ever
include the sqlca.h file which defines a structure called sqlca (wonder
where
that name came from). This is regrettable since it works with OCI just as
well as Pro*C. There is a data point in sqlca called sqlca.sqlerrm which
under
normal circumstances is set to 0 by Oracle on the completion of every call.
Now
if your session is no longer valid you'll find it set to -1012 in which case
you
need to reconnect to the database.
Dick Goulet
BTW: One other kind of an irk in the side I have with OCI programs that do
not
include sqlca.h is that when they want to retrieve a pile of data they go
and
count all of the rows that fulfill the where clause so as to know when they
have
fetched all of the data. Well instead you can fetch a row of data and then
check sqlca.sqlerrm. If it's > 0 then you've gotten all of the data there
is.
____________________Reply Separator____________________ Author: "Yusron Hilmy" <yusron_at_ebdesk.com> Date: 8/14/2001 9:20 PM
Hi All,
I am using OCI to build my oracle application. In OCI, how I can check if oracle connection/session is still valid ? like dbdead() in MSSQL.
Thanks,
Yusron
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Yusron Hilmy
INET: yusron_at_ebdesk.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Aug 15 2001 - 11:24:29 CDT
![]() |
![]() |