Subject | Re: [firebird-support] why do I not get a result set |
---|---|
Author | Martijn Tonies |
Post date | 2005-04-19T07:59:30Z |
Hello Grant,
I don't know the FIBPlus components, but I do know that most
component use Exec to execute a query and Open to open up a
resultset.
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com
> Using the following query I only seem to get a record count of 1 when ITry Open instead of ExecQuery.
> know the number of records in the database is 5.
>
> Also the result set does not enter the while not EOF loop and hence I
> can not get at the data returned.
>
> Any help please.
>
> // SELECT DETECTID, ITEM001 FROM D_LIST_HEAD WHERE DATATYPE = :IDno
>
> with Get_DataListItems do
> begin
> try
> Transaction.StartTransaction;
> Prepare;
> Params[0].Value := IDNo;
> ExecQuery;
I don't know the FIBPlus components, but I do know that most
component use Exec to execute a query and Open to open up a
resultset.
> while not EOF doWith regards,
> begin
> R := T;
> T := T + 1;
> SetLength(TempArray, T);
> TempArray[R].ID :=
> Get_DataListItems.FieldByName('DETECTID').AsInteger;
> TempArray[R].Item :=
> Get_DataListItems.FieldByName('ITEM001').AsString;
> MyList.Items.Add(TempArray[R].Item);
> Next;
> end;
> Transaction.Commit;
> except
> begin
> Transaction.Rollback;
> raise;
> end;
> end;
> end;
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com