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

Home -> Community -> Usenet -> c.d.o.server -> PRO*C: what is host_variable for default connection?

PRO*C: what is host_variable for default connection?

From: <thtsang_yh_at_yahoo.com.hk>
Date: 14 Dec 2004 18:46:30 -0800
Message-ID: <1103078790.851114.175550@c13g2000cwb.googlegroups.com>


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

Original text of this message

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