Einzelnen Beitrag anzeigen

question

Registriert seit: 17. Apr 2013
97 Beiträge
 
#1

SQL Query in object Inspector

  Alt 8. Feb 2014, 19:19
Hi,
I am writing a simple query in delphi which is working fine
Code:
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('SELECT bezeichnung FROM artikel where artnr=:ID');
ADOQuery1.Parameters.ParamByName('ID').Value:=2;
ADOQuery1.Open;
but if i write the same code ADOQuery1 in object Inspector and write the following code
Code:
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.Parameters.ParamByName('ID').Value:=2;
ADOQuery1.Open;
i got the following error 'ADOQuery1: Parameter'ID' not found
i dont know why it is not when i write the query in object inspector , i have check database connection and the parameter name as well ,everything is ok
could anybody please help me
Miniaturansicht angehängter Grafiken
screen.png  
  Mit Zitat antworten Zitat