Re: Declare Cursor for 2nd DB Connection

From: Scott Urman <surman_at_wwsun10.us.oracle.com>
Date: 9 Dec 1994 18:52:32 GMT
Message-ID: <3ca91g$i82_at_dcsun4.us.oracle.com>


In article <1994Dec8.223712.2596_at_tdkt.mn.org>, choang_at_tdkt.mn.org (Carl Hoang) writes:
|> I'm using Pro*C 1.5.9.0.1. I'm getting a PCC-W-0045 message for this SQL
|> statement:
|> EXEC SQL AT my_db DECLARE my_cursor CURSOR FOR my_sql;
|> Somehow it doesn't like "AT" and ignores it and goes on with the
|> compilation. During the executable, it fails and should because I'm asking
|> for a specific non-default DB. Do you have a suggestion on how to fix this
|> err? Thanks.
|> Carl Hoang choang_at_tdkt.mn.org

Are you using dynamic SQL? If so, check out page 9-19 of the 1.5 Precompilers Manual:

EXEC SQL AT my_db DECLARE my_sql STATEMENT; /* This is where the AT clause goes*/

EXEC SQL PREPARE my_sql FROM :string;

EXEC SQL DECLARE my_cursor CURSOR FOR my_sql; Received on Fri Dec 09 1994 - 19:52:32 CET

Original text of this message