Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C Connections
I did it using the ORACLE_SID value as an environment variable if we all
meaning the same thing. That selects the ORACLE server. Additionally my
database is sectioned off into x applications called xxbbe and y
applications called yapps. to get to the x tables I use xxbbe.tablename and
to use a function under yapps I call it with yapps.function() or package.
Chris Angus wrote:
> 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 - 07:58:14 CDT
![]() |
![]() |