Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jacques Sanson got error 252 (cannot get system information for table) on a simple count(*) in a stored procedure. Art Kagel said the ISAM error code is needed to find the cause. Asked how to get it in ESQL/C, Kagel said to loop with GET DIAGNOSTICS, or check sqlca.sqlerrd[1] after the failing statement when sqlcode is negative. Cause not determined.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Jacques SANSON — — source: Usenet: comp.databases.informix
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--
↪ replying to Jacques SANSON
Art S. Kagel — — source: Usenet: comp.databases.informix
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
↪ replying to jsanson
Art S. Kagel — — source: Usenet: comp.databases.informix
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
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.