Subject | Re: Equivalent SQL to Dataset.Locate statement |
---|---|
Author | mikcaau |
Post date | 2006-08-11T10:15:43Z |
--- In firebird-support@yahoogroups.com, "Nols Smit" <nols@...> wrote:
user to that record located. In other words: After execution of the
statement, the user must be able to move to previous and next record.
Select Specimen_Nr
from SomeTable
where Specimen_Nr = :SpecNo
In Delphi
Transaction.active := true;
If not prepared then prepare;
ParamByName('SpecNo').asString := "'%" + Param + "%'";
execQuery;
if not FieldByName('Specimen_Nr').IsNull then begin
ShowMessage('No such record!');
end else begin
ShowMessage('Record found!');
end;
If Transaction.InTransaction then Transaction.Commit;
mick
>key value of a table, I use the Pascal DataSet.Locate statement:
> Hi.
>
>
> In a FireBird 1.5 and Delphi 7 application, when the user transmit a
> if not IBDRegister.Locate('Specimen_Nr', VarArrayOf([This_ID]),[loPartialKey]) then
> ShowMessage('No such record!');Select statement be to locate a specific record but not to limit the
>
> But it seems very slow in execution. What will the equivalent SQL
user to that record located. In other words: After execution of the
statement, the user must be able to move to previous and next record.
>The query
>
> Regards,
>
> Nols Smit
Select Specimen_Nr
from SomeTable
where Specimen_Nr = :SpecNo
In Delphi
Transaction.active := true;
If not prepared then prepare;
ParamByName('SpecNo').asString := "'%" + Param + "%'";
execQuery;
if not FieldByName('Specimen_Nr').IsNull then begin
ShowMessage('No such record!');
end else begin
ShowMessage('Record found!');
end;
If Transaction.InTransaction then Transaction.Commit;
mick