Var month1,month2: integer;
...
begin
...
//在ado中,对sql server用
ADoQuery1.Close;
adoquery1.SQL.Clear;
adoQuery1.SQL.ADD('month(销售日期)>=:t1 and month(销售日期)<=:t2');
AdoQuery1.Parameters.ParamByName('t1').Value:=month1;
AdoQuery1.Parameters.ParamByName('t2').Value:=month2;
AdoQuery1.open; //当 month1,month2取值为1到9时,正常,
//但 month1,month2取值在10以上时,好象就不对了,是怎么回事?
...
begin
...
//在ado中,对sql server用
ADoQuery1.Close;
adoquery1.SQL.Clear;
adoQuery1.SQL.ADD('month(销售日期)>=:t1 and month(销售日期)<=:t2');
AdoQuery1.Parameters.ParamByName('t1').Value:=month1;
AdoQuery1.Parameters.ParamByName('t2').Value:=month2;
AdoQuery1.open; //当 month1,month2取值为1到9时,正常,
//但 month1,month2取值在10以上时,好象就不对了,是怎么回事?
解决方案 »
- 寻在最好的delphi教程,书籍……
- 名位朋友看看这代码出现Field Form1.memo1 does not have a corresponding component,removethe.
- 调用webservices出现Bad Request (400)错误!!
- midas socket 连接断开问题
- 上吊跳楼也要问的问题!!!
- 数据集重新排序问题!简单,给点建议。
- 关于安装的问题
- 这是不是CSDN的BUG?!
- "Ivalid register combination"什么错误?
- 我刚开使学ASP,请指教!!!!
- 将数据导入到文本文件时的格式问题
- 哥们今天领了八月十五一等奖---废话少说放水,,
但是用between的结果也是一样