Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PRO*C++: calling STORED PROCEDURES on different database CONNECTIONS
My PRO*C++ application connects to 3 different Oracle databases to get data. I differentiate between the 3 in the embedded SQL by using the "AT" clause (because I leave the connections open until the end of the program). For example:
// this works
EXEC SQL AT :sql_db1
SELECT order_count
INTO :hvn_order_count
FROM tbl_the_table
WHERE col_id = :hvn_id;
This works fine. However, I also need to call stored procedures on these 3 databases but I'm not sure about what syntax I need to use that will tell the stored procedure what database connection I want it to use. I tried using the "AT" and "USING" clauses but it didn't work, for example:
// this doesn't work
EXEC SQL EXECUTE AT :sql_db1
BEGIN
sp_the_procedure(:hvn_order_id);
END;
END-EXEC;
I suspect I need to use some specific PL/SQL syntax...
Thanks in advance,
-Chris
cfrankli_at_thewatercooler.com
Received on Tue Jan 12 1999 - 16:24:12 CST
![]() |
![]() |