adoQry.sql.add('update shop_data set date=#2004-12-01# where id =13')
如何实现?
怎么看别人是可以的?
如:sql.add('SELECT * FROM ddd where end_date <= #2004-9-14#')//别人说是可以的,但我没试过
如何实现?
怎么看别人是可以的?
如:sql.add('SELECT * FROM ddd where end_date <= #2004-9-14#')//别人说是可以的,但我没试过
begin
Close;
SQL.Clear;
SQL.Text:='update shop_data set date= :Awhere id =: B';
Paramters.ParamByName('A').Value:=StrToDateTime('2004-12-01');
Paramters.ParamByName('B').Value:=13;
Open;
end;
这样写相对比较不容易出错
可能是你用了adoqry.open(select 用); 应该是adoqry.execsql(delete insert update用);
如果你用的是SQL Server,系统会自动将与关键字重名的字段名用[]括起来。