Re: Pro*C and Oracle 6

From: <rhari_at_us.oracle.com>
Date: Thu, 11 Feb 1993 19:13:48 GMT
Message-ID: <1993Feb11.111348.1_at_us.oracle.com>


In article <1l6an0INNbg4_at_spock.dis.cccd.edu>, craiga_at_spock.dis.cccd.edu (Craig Armstrong) writes:
> I have a problem that is driving me nuts. I've built a SQL INSERT command
> in a local variable (this is a C program) and try to execute it with
> EXEC SQL EXECUTE IMMEDIATE :buf. It always come back with invalid statement.
> I've checked all the obvious and still no luck. The command is proper in
> syntax and should work. The command is over 255 bytes, though. I'm afraid
> to ask, but is this a problem with Pro*C and if so, any work arounds??
> --
> Craig Armstrong - VINES hack... "If it's a good idea, do it.
> craiga_at_cccd.edu It's a lot easier to apologize
> Coast Community College District than to get permission!"
> Costa Mesa, Ca.

-- 

You left out a critical bit of information in your posting. What is the type
of the variable that you declared. If you declared something like this

char buf [300]; /* this will be treated as ORACLE TYPE 1 */

and then using c string functions you populated it. This will not follow
ORACLE TYPE 1 rules. Try using a VARCHAR.

Radhakrishna Hari
rhari_at_us.oracle.com
Received on Thu Feb 11 1993 - 20:13:48 CET

Original text of this message