怎么根据ID查询表

如何根据ID查询表?ID是表的自增字段,想根据ID查询表。Query.CloseQuery.SQL.ClearQuery.SQL.Add(select

如何根据ID查询表?
ID是表的自增字段,想根据ID查询表。
  Query.Close;
  Query.SQL.Clear;
  Query.SQL.Add('select * from test where id=@idindex');//这地方不对。ID是INTEGER,后面该怎么写呢? 让 ID=edit1.text
  Query.Parameters.ParamByName('id').Value:=strtoint(id_edit.Text);
  Query.Open;

[解决办法]
参数符号不是@而是: