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

Home -> Community -> Usenet -> c.d.o.server -> Re: Checking Connection Status in a Pro*C program

Re: Checking Connection Status in a Pro*C program

From: <MEYOU_at_ComPorts.com>
Date: Tue, 14 Apr 1998 15:23:56 GMT
Message-ID: <35337c4e.4215563@news.netvigator.com>


On 13 Apr 1998 17:19:02 GMT, jstrange_at_imtn.dsccc.com (John Strange) wrote:

>some code snippets:
>
>
>EXEC SQL INCLUDE SQLCA ;
>
> EXEC SQL CONNECT :appidpwd ;
>
> errno = 0 ; /* clear errno in case oracle sets it */
>
> if (sqlca.sqlcode != 0) /* check oracle error */
> {
> your error code here
> }
>
>

Thanks for your reply but what I want to know is how to check for connection status long after the above call is made.

My server daemon listens for clients' call and insert appropriate stuff from the clients into a remote oracle database. The daemon only logs in once into the remote database. I will get CORE DUMPED when the daemon performs the insert action if the existing connection is not valid (ie the remote database is down) . If I know the connection status, I can perform other necessary action to safeguard smooth operation (to use a secondary remote database). This daemon can not down and must perform smoothly.

Please help.....

Regards

Steven.

>MEYOU_at_ComPorts.com wrote:
>: Is there anyway to check connection status after "CONNECT" call in a
>: Pro*C program?
>
>: Need to know how very urgently. Please help!
>
>: Regards
>
>: Steven
>
>--
>While DSC may claim ownership of all my ideas (on or off the job),
>DSC does not claim any responsibility for them. Warranty expired when you
>opened this article and I will not be responsible for its contents or use.
Received on Tue Apr 14 1998 - 10:23:56 CDT

Original text of this message

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