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 -> Re: Pro*C Connections

Re: Pro*C Connections

From: Dan Benwell <dan_at_benwell.co.uk>
Date: Sat, 21 Aug 1999 16:00:36 +0100
Message-ID: <7pmetl$7o2$1@lure.pipex.net>


you could query the v$database view to determine the oracle sid. Dan
Chris Angus <chris.angus_at_acsol.freeserve.com> wrote in message news:7pknr5$olv$1_at_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 Sat Aug 21 1999 - 10:00:36 CDT

Original text of this message

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