var
no:string;
begin
no:=listview1.Items[listview1.Selected.Index].Caption;
with query1 do
begin
close;
sql.clear;
sql.add('delete from station where sation_id:='+''''+no+'''');
execsql;
end;
上面是我代码,但是执行到删除语句时报错:
query1.field='1'if of unknow type
这究竟是什么原因?
no:string;
begin
no:=listview1.Items[listview1.Selected.Index].Caption;
with query1 do
begin
close;
sql.clear;
sql.add('delete from station where sation_id:='+''''+no+'''');
execsql;
end;
上面是我代码,但是执行到删除语句时报错:
query1.field='1'if of unknow type
这究竟是什么原因?
解决方案 »
- 100分求教:进销存中付款方式的设置?
- 连接informix数据库,为何查询速度奇慢
- 如何在状态栏中加载背景图片
- 关于打包路径的问题
- 新年到了,做个Delphi程序员的年薪调查,请大家参与
- ★Delphi的控制台程序中有没有方法直接判断按下的按键,就像是TP7.0中的readkey,而不用输入回车键?
- 打印小问题
- 如何在主程序运行之前先弹出一个登陆框????
- cobi(我是小新,我只有5岁)请进! (50分给你)
- ****************dbgrid和query问题********************
- 如何让form中 edit的大小随着form的变化也变化
- 100份求购delphi简单源码,不够再加!
SQL.Add('DELETE FROM Station WHERE (Station_ID = "'+no+'"'));
close;
sql.clear;
sql.add('delete from station where sation_id ='''+no+'''');
execsql;
end;
sql.add('delete from station where sation_id = '+''''+no+'''');
str:string;begin
str:='delete from station where sation_id ='''+no+'''';
close;
sql.clear;
sql.add(str);
execsql;
end;
改为
sql.add('delete from station where sation_id='''+no+'''');