Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Either BOF or EOF is true error message problem

Status
Not open for further replies.

LumpHammer

Technical User
May 14, 2002
4
GB
Is there a way to make SQL server return this error message when doing operations on an empty result set?

I am doing development on SQL server with MS-DAC components and in the development environment it works fine. When I go onto the customer site the same code connecting to Sybase 11 via ODBC comes back with the error "Either BOF or EOF is true, or the current record is deleted..."

I understand why this is happening, I would just like to be able to duplicate it while doing development to avoid nasty surprises on site.

Richard
 
Code:
Is there a way to make SQL server return this error message when doing operations on an empty result set?

No, the message is returned by ADO. It has nothing to do with the DBMS. You should always check the status of the recordset before doing any operation, e.g.

Code:
set rs = connect.execute("select * from t where c1 = 4711")
if rs.eof then
'no data found
else
'proceess data
end if

If you need more help you need to be more specific.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top