Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> PRO*C: what is host_variable for default connection?
In PRO*C, I can use the 'EXEC SQL AT :host_variable' to execute SQL
statements on a non-default connection. However, can I specify
something to indicate the default connection?
The reason is that I want to write some generic function, which may run on both a default and non-default connection. If this is not possible, would I need to write something like for following for every EXEC SQL statement?
if (strcmp(host_variable.arr, "DEFAULT")==0) {
EXEC SQL select ...
}
else {
EXEC SQL AT :host_variable select ...
}
Received on Tue Dec 14 2004 - 20:46:30 CST
![]() |
![]() |