Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Verifying Oracle connection in a Pro*C program

RE: Verifying Oracle connection in a Pro*C program

From: Cale, Rick T (Richard) <RICHARD.T.CALE_at_saic.com>
Date: Tue, 23 May 2000 09:15:26 -0700
Message-Id: <10506.106391@fatcity.com>


You examine sqlca.sqlcode immediately after trying to connect. I believe if it equals 0
then you successfully connected.

Rick

> -----Original Message-----
> From: Gruel III, Karl [SMTP:kgruel_at_Paradigm4.com]
> Sent: Tuesday, May 23, 2000 9:55 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Verifying Oracle connection in a Pro*C program
>
>
> I am fairly new to Pro*C and PL/SQL, so please excuse any ignorance.
>
> I was wondering if anybody knew a method to verify that you have
> connection to Oracle before trying a lookup/update in a Pro*C
> application.
>
> Here's my situation:
>
> I have a two machine setup, one is the database, the other is where the
> apps are run from. Recently, someone (accidentally) disconnected the
> database machine from the network. The next time my application tried
> to do a lookup in the database, it hung and I had to restart the app
> after the database machine was reconnected. I have looked at all the
> documentation that I can find, but I have not found anything describing
> a method to check for this.
>
> Any help is greatly appreciated.
>
> --
> Karl Gruel
> kgruel_at_paradigm4.com
> --
> Author: Gruel III, Karl
> INET: kgruel_at_Paradigm4.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).
Received on Tue May 23 2000 - 11:15:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US