Subject RE: [IBO] Problem with IB_Cursor.First
Author Bill Morrison
Two things struck me about this :

a) shouldn't it be :

SELECT (SELECT MIN(COD_USU) FROM RH) AS MINIMO,
GEN_ID(GEN_USUARIO,0) AS MAXIMO
FROM RDB$DATABASE

b) This statement should only return 1 row. Thus the use of the IB_DSQL
component would be indicated, the cursor is probably having problems because
it's returning one row.


HTH


Bill Morrison


-----Original Message-----
From: Carlos H. Cantu [mailto:ibo@...]
Sent: Monday, August 13, 2001 9:49 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] Problem with IB_Cursor.First


I just upgraded to IBO 4.2Ea. Now when I call the first method for a
IB_Cursor I'm getting :

ISC ERROR CODE:335544569

ISC ERROR MESSAGE:Dynamic SQL Error
SQL error code = -804
Incorrect values within SQLDA structure

Any idea of what is going on here ? The cursor is prepared OK and the SQL
is :

SELECT (SELECT MIN(COD_USU) FROM RH) AS MINIMO,
(SELECT GEN_ID(GEN_USUARIO,0) FROM RDB$DATABASE) AS MAXIMO
FROM RDB$DATABASE

Doing a trace I found the erro begin cause in the maked line :

procedure TIB_Dataset.SysFirst;
begin
SysBeforeScroll;
if Active then
SysClose;
SysOpen;
if CursorBof and not CursorEof then
SysFetchNext; <=======================
SysAfterScroll;
end;


[]s

Carlos
WarmBoot Informatica - http://www.warmboot.com.br
Interbase-BR - http://www.interbase-br.com




Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/