[Error 252] Exception during a simple count
Posted in 2003
Topics: Stored Procedures & SPL, Transactions, Locking & Isolation
Hi, I need assistance on the following issue : I get the following error : 252 : Cannot get system information for table while doing a simple "select count(*) into tempvalue from mytable" in a stored procedure. The table "mytable" is used a lot, though in this particular case it shouldn't matter much. This simple stored procedure does NOT include the "set isolation to dirty read" statement, although it certainly should. The issue really is that I don't know why I get this particular error message. Thanks in advance, --Jacques--
On Mon, 20 Oct 2003 08:05:45 -0400, Jacques SANSON wrote: As the text for this error (finderr -252) explains, you have to know the ISAM error in order to determine WHY the system catalog table records could not be read. So... what was the ISAM error code? Art S. Kagel > Hi, > > I need assistance on the following issue : I get the following error : 252 : > Cannot get system information for table > > while doing a simple "select count(*) into tempvalue from mytable" in a stored > procedure. > > The table "mytable" is used a lot, though in this particular case it shouldn't > matter much. This simple stored procedure does NOT include the "set isolation > to dirty read" statement, although it certainly should. > > The issue really is that I don't know why I get this particular error message. > > Thanks in advance, > --Jacques--
If the ISAM code is indeed needed, I need to know how to extract this code from Informix in ESQL/C. I use "get diagnostics" to get the other info, what do I need to do to get the ISAM error code ? Thanks, --Jacques-- -- Posted via http://dbforums.com
On Mon, 20 Oct 2003 10:49:18 -0400, jsanson wrote: Using get diagnostics you need to loop until all errors have been retrieved, see the ESQL Programmers manual for details. Using Informix specific syntax you can check the sqlca error structure (same docs) immediately after the SQL generating the error. The field sqlca.sqlcode is the SQL error (ie the -252 you saw) and sqlca.sqlerrd[1] is the ISAM error if sqlcode is < 0. Art S. Kagel > If the ISAM code is indeed needed, I need to know how > > to extract this code from Informix in ESQL/C. > > > > I use "get diagnostics" to get the other info, > > what do I need to do to get the ISAM error code ? > > > > Thanks, > > --Jacques-- > > > -- > Posted via http://dbforums.com