Re: TADOQuery parameter error



Sorry I accidentally press the send button.
Here is whole message:

Delphi 7, TADOQuery and MS Access 2000.
I got inconsistent runtime error of parameter not found on some TADOQuery
components. Some work fine but some not.
eg.

SQL in the TADOQuery
select * from employee where ID = :ID

Delphi code:
qryEmployee.Close;
qryEmployee.Parameters.ParamByName('ID').AsInteger := 10;
qryEmployee.Open;

I got the compilation error above.

I need to do the following:
qryEmployee.Close;
qryEmployee.SQL.Clear;
qryEmployee.SQL.Text := 'select * from employee where ID = ' + IntToStr(10);
qryEmployee.Open;








"Alan T" <alanpltseNOSPAM@xxxxxxxxxxxx> wrote in message
news:45a5c1e1@xxxxxxxxxxxxxxxxxxxxxxxxx
Delphi 7, TADOQuery and MS Access 2000.
I got inconsistent runtime error of parameter not found on some TADOQuery
components. Some work fine but some not.
eg.

SQL in the TADOQuery
select * from employee where ID = :ID

Delphi code:
qryEmployee.Close;
qryEmployee.Parameters.ParamByName('ID').AsInteger := 10;
qryEmployee.Open;

I got the compilation error above.

I need to do the following:



.


Quantcast