beverly@ai.cs.wisc.edu (Beverly Seavey (-Kung)) (08/31/90)
In an ESLQC (SQL embedded in C) program I was getting an error on
a select (control was transferred as a result of a EXEC SQL WHENEVER
ERROR GOTO... statement, to a diagnostic statement) so I added
a couple of lines:
EXEC SQL INQUIRE_INGRES (:error_buf = ERRORTEXT);
printf (\nSQL Error:\n %s\n", error_buf);
After adding these 2 lines I can no longer preprocess, I get an
error msg:
Error #19141 : (Syntax)
Syntax error on "(".
The error occurs on the line with the INQUIRE_INGRES.
I copied the 2 lines out of version 6 documentation, though we are running
some version 5. I have included the SQLCA #include.
Any insights as to what is wrong?
.eric@wdl1.wdl.fac.com (Eric Kuhnen) (09/01/90)
Beverly Seavey (-Kung) writes: >In an ESLQC (SQL embedded in C) program I was getting an error on >a select (control was transferred as a result of a EXEC SQL WHENEVER >ERROR GOTO... statement, to a diagnostic statement) so I added >a couple of lines: >EXEC SQL INQUIRE_INGRES (:error_buf = ERRORTEXT); >printf (\nSQL Error:\n %s\n", error_buf); >After adding these 2 lines I can no longer preprocess, I get an >error msg: >Error #19141 : (Syntax) >Syntax error on "(". >The error occurs on the line with the INQUIRE_INGRES. >I copied the 2 lines out of version 6 documentation, though we are running >some version 5. I have included the SQLCA #include. >Any insights as to what is wrong? Since you haven't mentioned it, make sure that "error_buf" is defined within an "exec sql begin declare section" block. Its size should be 256. Also, you forgot an opening double-quote on the "printf" statement. "Q"