From: Chris Angus <chris.angus_at_acsol.freeserve.com>
Date: Sat, 21 Aug 1999 00:28:44 +0100
Message-ID: <7pknr5$olv$1_at_news6.svr.pol.co.uk>
Hi,
[Quoted] [Quoted] 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?
}
}
}
Date: Sat, 21 Aug 1999 00:28:44 +0100
Message-ID: <7pknr5$olv$1_at_news6.svr.pol.co.uk>
Hi,
[Quoted] [Quoted] 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 - 01:28:44 CEST