Subject | Re: [IBO] is dataset empty |
---|---|
Author | Gediminas |
Post date | 2004-01-06T17:00:26Z |
suppose, SP query is: select * from SP_Select_Name( :Name_ID )
pCursor->Prepare;
/* Eof=false, Bof=true */
pCursor->First;
/* no data until pass Name_ID parameter, Eof=false; Bof=false */
pCursor->ParamByName( "Name_ID )->AsInt = 20;
/* has data for Name_ID=20, can work with it, Eof=false; Bof=false */
pCursor->Delete();
/* empty, no data, pCursor->State=dssPrepared */
pCursor->First();
/* need to pass Name_ID parameter, pCursor->State=dssBrowse */
....
what I need is to be sure, that edit mode could be entered when there is a
data - to protect if bad Name_ID is passed or it wasn't supplied at all.
What I need, is a generic CanEdit( TIB_Dataset * pDataset ) method, which
will work with TIB_Query & TIB_Cursor objects. For the query objects I test
IsTempty, question got only for cursor objects.
At 2004-01-06 04:42, you wrote:
The Truth Is Out There
pCursor->Prepare;
/* Eof=false, Bof=true */
pCursor->First;
/* no data until pass Name_ID parameter, Eof=false; Bof=false */
pCursor->ParamByName( "Name_ID )->AsInt = 20;
/* has data for Name_ID=20, can work with it, Eof=false; Bof=false */
pCursor->Delete();
/* empty, no data, pCursor->State=dssPrepared */
pCursor->First();
/* need to pass Name_ID parameter, pCursor->State=dssBrowse */
....
what I need is to be sure, that edit mode could be entered when there is a
data - to protect if bad Name_ID is passed or it wasn't supplied at all.
What I need, is a generic CanEdit( TIB_Dataset * pDataset ) method, which
will work with TIB_Query & TIB_Cursor objects. For the query objects I test
IsTempty, question got only for cursor objects.
At 2004-01-06 04:42, you wrote:
>That begs the question, why use ib_cursor if you need a buffered dataset?--/ Gediminas /--
>
>Helen
The Truth Is Out There