Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Use of PREPARE in Pro*C
A copy of this was sent to a_at_a.com (Anish Moni) (if that email address didn't require changing) On Fri, 05 Jun 1998 03:57:47 GMT, you wrote:
>Hi Pro*C Gurus,
>
>I am trying to use to cursors in my Pro*C code and keep getting an error
>ORA-00911 Invalid Character. Does anybody know what that error means? I am
>using Oracle 7.3 on Ultrix. The syntax I am using is as follows
>
>VARCHAR SqlString[100];
>.
>.
>
>SqlString.len = sprintf ( SqlString.arr, "SELECT ID FROM STUDENTS");
>EXEC SQL PREPARE LIST FROM :SqlString;
>
>When I tried putting printf statements to try and see how far the program
>goes, I figured out that the PREPARE statement is the one whihc is gawking.
>If anybody could provide any pointers as to what the correct syntax ought to
>be, I would really appreciate it. Thanks for taking the time to read this
>posting and reply. You could either send me mail at nmoni_at_hotmail.com or post
>to his news group.
>
>Sincerely,
>Anish
If I recall, on Ultrix sprintf returns a "char *" not the length of the sprintf'ed string (as almost all other versions do).
do a man on sprintf and make sure it isn't returning a pointer to SqlString.arr.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jun 05 1998 - 00:00:00 CDT
![]() |
![]() |