J
jbas
Unregistered / Unconfirmed
GUEST, unregistred user!
这样总是查不到数据库中的数据.怎回事?
sql.Add('select YSJLRQ,YSJLBZ from YSJLBT where YSJLRQ=:mrq');
parameters.ParamByName('mrq').Value:=ARQ;//ARQ在delphi中格式TDate;YSJLRQ在sqlserver中为datetime
open;
with result do
.....
数据库中有日期为YSJLRQ=2002-12-12的数据.
sql.Add('select YSJLRQ,YSJLBZ from YSJLBT where YSJLRQ=2002-12-12');也不行.
sql.Add('select YSJLRQ,YSJLBZ from YSJLBT where YSJLRQ=:mrq');
parameters.ParamByName('mrq').Value:=ARQ;//ARQ在delphi中格式TDate;YSJLRQ在sqlserver中为datetime
open;
with result do
.....
数据库中有日期为YSJLRQ=2002-12-12的数据.
sql.Add('select YSJLRQ,YSJLBZ from YSJLBT where YSJLRQ=2002-12-12');也不行.