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

Home -> Community -> Usenet -> c.d.o.misc -> Pro*C Connections

Pro*C Connections

From: Chris Angus <chris.angus_at_acsol.freeserve.com>
Date: Sat, 21 Aug 1999 00:28:44 +0100
Message-ID: <7pknr5$olv$1@news6.svr.pol.co.uk>


Hi,
In Pro*C Is it possible to determine the database name from your current connection? or to say all following sql now applies to database X?

The sort of code I've got is

void fn() {

       connect();
        do_work();
        disconnect();

}

what I need to do is have the connection persist but the do_work is a load of legacy code and there's a chance that the connection will be swiped if I just leave it connected.

is there any way of saying

void fn() {

       if (current connection not what I think it is)
            connect();
        do_work();

}

or ideally

void fn() {

       if (first time) connect() and call connection C;
        use C;
        do_work();
        stop using C:

}

in Pro*C so that the do_work function does not have to be filled with AT clauses?

Many thanks in advance for any help

Chris Received on Fri Aug 20 1999 - 18:28:44 CDT

Original text of this message

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