TADOQuery parameter error



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:


.



Relevant Pages

  • Re: question to Bill Todd and community / ADODB Unit in D7 Enterprise
    ... Delphi 7 Pro and Enterprise. ... is destroying the TADOQuery instance after every use. ... still see memory slowly increasing in preformance monitor. ...
    (borland.public.delphi.database.ado)
  • Re: the dbgrid will be uneditable
    ... only sqlserver tables and the program running in delphi can generate that ... >>if using tadoquery and sql to join two tables,the dbgrid will be ...
    (borland.public.delphi.database.ado)
  • Re: TADOQuery parameter error
    ... Delphi 7, ... I got inconsistent runtime error of parameter not found on some TADOQuery ... I got the compilation error above. ...
    (borland.public.delphi.database.ado)
  • Re: TADOQuery parameter error
    ... Delphi 7, ... I got inconsistent runtime error of parameter not found on some TADOQuery ... I got the compilation error above. ...
    (borland.public.delphi.database.ado)
  • Re: Query raises AccesViolation on DesignTime
    ... I'm using Delphi 5 with the UpdatePack1 and the AdoUpdate ... > I try to set the sql propertie in a TADOQuery, ...
    (borland.public.delphi.database.ado)