Subject | Re: [IBO] How To Know, Whether TIB_DSQL has returned any records or not ? |
---|---|
Author | Kamlesh |
Post date | 2003-07-03T17:38:26Z |
Thank You All
(because previous two replies emphasis on using TIB_Cursor)
i know i should use TIB_Cursor or TIB_Query
but when i m sure that there is only one record or when i want to select
only one record then do u think using TIB_DSQL is better
should i use it in following way
With TIB_DSQL.Create Do
Try
IB_Connection := MyConnection;
SQL.Text := < single record select statement>
Try
Execute;
< work with record >
Except
On E:EIB_ISCError Do
Begin
If E.ERRCODE = 335544374(error code for no record)
Then
< do something when no record >
Else
Raise;
End;
End;
Finally
Free;
End;
Regards
Kamlesh
> TIB_DSQL is an ideal component for doing this kind of select now that theYou mean TIB_DSQL is IDEAL for selecting single record.
> bug in InterBase that caused problems doing this is fixed in Firebird.
(because previous two replies emphasis on using TIB_Cursor)
i know i should use TIB_Cursor or TIB_Query
but when i m sure that there is only one record or when i want to select
only one record then do u think using TIB_DSQL is better
should i use it in following way
With TIB_DSQL.Create Do
Try
IB_Connection := MyConnection;
SQL.Text := < single record select statement>
Try
Execute;
< work with record >
Except
On E:EIB_ISCError Do
Begin
If E.ERRCODE = 335544374(error code for no record)
Then
< do something when no record >
Else
Raise;
End;
End;
Finally
Free;
End;
Regards
Kamlesh