Re: sqlerrd[0] <
Posted in 1994
Topics: SQL Development & Query Writing, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL
> > Hello! > > I would like to know the meaning of the sqlca.sqlerrd[0] field in Informix > Online 5.0. > > Background: Mode ANSI database, ESQL/C. > > I have $PREPAREd a "SELECT ... WHERE col = ?" statement, $ALLOCATEd a > descriptor etc. > Then, I $OPEN a cursor, which returns SQLCODE = 0 and sqlerrd[0] = 3, > which is normally 0. > > I wouldn't mind sqlerrd[0] = 3 very much, but the $DESCRIBE that follows > the OPEN statement dies with a segmentation fault, which doesn't happen > when sqlerrd[0] is 0. > > The really strange thing is that is doesn't happen always. > It depends on the value I set for the "?" in the SELECT statement. > (I use a $SET DESCRIPTOR statement to do that.) > > Since the nonzero contents of sqlerrd[0] is the only thing (for me to see) > that is different, I hope that it gives some insight as to what is going > wrong. > > Ideas anyone? > > > -Walter > > > > Walter When performing a select sqlerrd{0] will contain the estimated number of rows returned. Check to see if what you are selecting on is unique. Sounds like you might be selecting on a non unique value. Good Luck. R.J. Robert J. Cline II RJC Enterprises rcline@netcom.com rcline@gtetel.com