Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!mips!wdl1!eric From: eric@wdl1.wdl.fac.com (Eric Kuhnen) Newsgroups: comp.databases Subject: Re: need help with INGRES ESQLC "inquire_ingres" SQLCA stmt Message-ID: <310003@wdl1.wdl.fac.com> Date: 31 Aug 90 17:59:53 GMT References: <11117@spool.cs.wisc.edu> Lines: 28 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"