怎样为delphi自带的桌面数据库日期型字段赋值? select count(clientid) as aVariant from table1 where comdate='2003-05-16'我用上面的查询语句时报错:Type mismatch in expression.高手指教后面的'2003-05-16'应该怎么写才对? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用参数where comdate=:comdate然后ParamByName('comdate') := EncodeDate(2003,5,16);然后再返回数据集 我的具体代码如下:tryquery1.Close;strday:=formatdatetime('yyyy-mm-dd',now);strSql:='select count (clientid) as acount from clientreginfo where comdate='+quotedstr(strday);query1.SQL.text:=strSql;query1.Prepare;query1.Open;except....end;其中comdate字段定义为date型,运行时报错如题,各位大侠给看看,应该怎么改? 用参数传不报错了,但返回值却总是0而且不能察看query1.sql.text的完整的值郁闷! 如何让D7程序自动随windows2003开机LOGIN前自动加载运行? 实现多线程同步查询,但是有错误请高手帮忙看看:) 请大虾看看这个为什么不对,很菜的问题 客户端用socketconnection连接应用服务器 IntraWeb退出同时把IE窗口关掉! 如何将powerpoint嵌入delphi界面上 在Delphi中怎么样压缩Access数据库? delphi的日历问题。急急急 tquery问题 activeform应用shellexecute的问题. 关于窗口状态检测的问题 &=&=&=>> [600]分求IT产品(软件)好名字 <<=&=&=&
where comdate=:comdate
然后
ParamByName('comdate') := EncodeDate(2003,5,16);
然后再返回数据集
try
query1.Close;
strday:=formatdatetime('yyyy-mm-dd',now);
strSql:='select count (clientid) as acount from clientreginfo where comdate='+quotedstr(strday);
query1.SQL.text:=strSql;
query1.Prepare;
query1.Open;
except
....
end;
其中comdate字段定义为date型,
运行时报错如题,各位大侠给看看,应该怎么改?
而且不能察看query1.sql.text的完整的值
郁闷!