Subject Re: [IBO] How to know if a query is empty with an IB_Cursor
Author Martijn Tonies
> Strange but, when I'm doing :
>
> Close ;
> Prepare ;
> ParamByName('ID').AsInt64 := id ;
> First ;
> a := FieldByName('ID').IsNull ;
>
> Then :
> if the Cursor is in AutoFetchAll=true then a = false
> if AutoFetchAll is set to false, a = true... with the same data...
>
> So it does not work with AutofetchAll = true.
> I dont understand...
> Should I set AutoFetchAll to true or false ?

Hmm, although "ID" probably never is NULL, this is not the
way to check if there's data or not.

An empty resultset does not return NULL for it's columns, it
doesn't return _anything_ at all.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com