对c:\employee.dbf执行更新操作,代码如下:
——————————————————————————————————————
ADOConnection1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=dBase 5.0;Persist Security Info=False ';
ADOConnection1.Connected := True;with ADOQuery1 do
begin
Active := False;
Connection := ADOConnection1;
SQL.Clear;
SQL.Add('update employee set pay=200 where worktime=3');
ExecSQL;
end;
——————————————————————————————————————
程序运行时报错“update语法错误”。
不知道update语句应该怎么写?
——————————————————————————————————————
ADOConnection1.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\;Extended Properties=dBase 5.0;Persist Security Info=False ';
ADOConnection1.Connected := True;with ADOQuery1 do
begin
Active := False;
Connection := ADOConnection1;
SQL.Clear;
SQL.Add('update employee set pay=200 where worktime=3');
ExecSQL;
end;
——————————————————————————————————————
程序运行时报错“update语法错误”。
不知道update语句应该怎么写?
解决方案 »
- 请问是否可以不理会这个警告Constant 0 converted to NIL
- 请教关于delphi调用C/C++的dll的双指针ppchar的数据的问题
- 如何控制tmemo的输入行数和每一行的输入字符数
- 请教各位大哥,一个很奇怪的错误,(我怎么也找不出原因),谢谢!
- 有关VclSkin的问题,如何在窗体更新时,背景为不透明。因为刷新窗体时,出现很多的闪动,反正很乱。请大家帮忙。
- 我在WIN2K SERVER下装有ORACLE815 SERVER在我加入一个新的别名保存后点击SERVER NAME时,不能显示ORACLE别名的列表,弹出“Operation not
- 怎样把一个应用程序和另一个程序合并在一起
- 在c中unsigned char*,char*在d中分别表示什么??
- 一个关于对象模型的问题
- 菜单问题,求求帮忙,在线等,帮帮忙!
- query怎么停止啊!在线等!
- TNode的Data能否指向一个TAction??
ADOConnection1.Execute('update employee set pay=200 where worktime=3');
begin
Close;
SQL.Clear;
SQL.Add('update employee set pay=200 where worktime=3');
ExecSQL;
end;
begin
Close;
SQL.Clear;
SQL.Add('update employee set pay='''200''' where worktime='''3'''');
ExecSQL;
end;