请问s里的DELETE后的时间(入库时间>="'+s1+'") and (入库时间<="'+s2+'")'要怎么表示啊下面例子运行时程序会出错!信息是 {project project1.exe raised exception class EDBEngineError with message'General SQL error.[Microsoft][ODBC Microsoft Access driver]CDE 参数不足,期待是1。’process stopped.Use step or Run to continue.}procedure Tfm_rkqk.Button1Click(Sender: TObject);
var
s,s1,s2:string;
begin
table1.Close; s1:=datetostr(datetimepicker1.Date);
s2:=datetostr(datetimepicker2.Date);
s:='delete from 产品入库表 where (入库时间>="'+s1+'") and (入库时间<="'+s2+'")';
query1.Close;
query1.SQL.Clear;
query1.SQL.Add(s);
query1.ExecSQL;
table1.Open;
能回答的高手请发小弟E-MAIL:[email protected] 多谢!
var
s,s1,s2:string;
begin
table1.Close; s1:=datetostr(datetimepicker1.Date);
s2:=datetostr(datetimepicker2.Date);
s:='delete from 产品入库表 where (入库时间>="'+s1+'") and (入库时间<="'+s2+'")';
query1.Close;
query1.SQL.Clear;
query1.SQL.Add(s);
query1.ExecSQL;
table1.Open;
能回答的高手请发小弟E-MAIL:[email protected] 多谢!
解决方案 »
- delphi操作advstringgrid问题,新手。
- 在delphi中如何把groupbox改成圆角矩形
- .cjstyles皮肤文件是用什么东东制作出的?
- 当把控件底部对齐时控件怎么会不见了?
- Delphi开发wow插件的难度有多大?
- VC(或者说是Windows)的LPCTSTR的类型对应Delphi中什么类型?烦请指点
- 刚接了一个Delphi的项目,想请教各位关于delphi的几个问题!谢谢!
- 问一个路由器的端口映射问题?
- 怎么样把Access数据转换成paradox类型数据啊???Delphi自带的工具行不行啊?
- 如何暂存记录?快!
- 小弟分少,希望各位帮帮忙!
- 急!为什么我程序编译时会报这个错怎么办?
在delphi里使用两个单引号来表示一个单引号
是没有双引号的
用单引号,楼上为正解
s2:='#'+datetostr(datetimepicker2.Date)+'#'
s:='delete from 产品入库表 where (入库时间>='+s1+') and (入库时间<='+s2+')';
试试小别的
(2)从错误信息来看,也可能是ADOConnection连接错误