Subject | RE: [IBO] DSQL Result: "attempt to fetch past the last record in a record stream" |
---|---|
Author | IBO Support List |
Post date | 2011-12-30T00:39:08Z |
Ed,
No, you are getting what can be expected. If you do not receive one and only
one return record with TIB_DSQL then you will get an exception of some kind.
There is a public property called TreatSingletonEmptySetAsEof that you can
set to true if you don't want an error message.
Jason
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Ed Dressel
Sent: 29 December 2011 11:34 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] DSQL Result: "attempt to fetch past the last record in a
record stream"
In talking with Jason, I thought he indicated that I could use a DSQL object
if a result set only contains one record--maybe there is more to it?
I tried the following SQL:
select First 1 Client_ID
from ClientInfo
where Upper_First_Name = :FirstName
The record does not exist, and I am getting the following exception when I
call .ExecSQL:
attempt to fetch past the last record in a record stream
When I changed it to a cursor, and use .First, it worked fine.
Am I doing something wrong?
Thanks,
Ed Dressel
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links
No, you are getting what can be expected. If you do not receive one and only
one return record with TIB_DSQL then you will get an exception of some kind.
There is a public property called TreatSingletonEmptySetAsEof that you can
set to true if you don't want an error message.
Jason
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Ed Dressel
Sent: 29 December 2011 11:34 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] DSQL Result: "attempt to fetch past the last record in a
record stream"
In talking with Jason, I thought he indicated that I could use a DSQL object
if a result set only contains one record--maybe there is more to it?
I tried the following SQL:
select First 1 Client_ID
from ClientInfo
where Upper_First_Name = :FirstName
The record does not exist, and I am getting the following exception when I
call .ExecSQL:
attempt to fetch past the last record in a record stream
When I changed it to a cursor, and use .First, it worked fine.
Am I doing something wrong?
Thanks,
Ed Dressel
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links