A
ansili
Unregistered / Unconfirmed
GUEST, unregistred user!
我做了三层,唯一不同是用本地数据库ACCESS,在查询日期类型出现这个错误:Argument are of the wrong type, Are out of acceptable rang Or are in conflict with one another.请问什么原因。在线等待,代码如下:(50分)<br />我做了三层,唯一不同是用本地数据库ACCESS,在查询日期类型出现这个错误:
Argument are of the wrong type, Are out of acceptable rang
Or are in conflict with one another.
请问什么原因。在线等待,代码如下:
if date1.Date>date2.Date then
begin
messagedlg('开始时间不能大于结束时间。',mtinformation,[mbOK],0);date1.SetFocus;Exit;
end;
spt:=0;bjt:=0;tt:=0;
decodedate(date1.Date,y,m,d);decodetime(time1.Time,hh,mm,ss,ms);
str1:='#'+inttostr(m)+'/'+inttostr(d)+'/'+inttostr
;
str1:=str1+' '+inttostr(hh)+':'+inttostr(mm)+':'+inttostr(ss)+'#';
decodedate(date2.Date,y,m,d);decodetime(time2.Time,hh,mm,ss,ms);
str2:='#'+inttostr(m)+'/'+inttostr(d)+'/'+inttostr
;
str2:=str2+' '+inttostr(hh)+':'+inttostr(mm)+':'+inttostr(ss)+'#';
man.Query2.Close;
man.Query2.CommandText:='select * from sphisx where dd>='+str1+' and dd<='+str2;
showmessage(man.Query2.CommandText);//exit;
man.Query2.Open;
非常急!!!!!!!!!!!!!!!!!!!!!!!!!
Argument are of the wrong type, Are out of acceptable rang
Or are in conflict with one another.
请问什么原因。在线等待,代码如下:
if date1.Date>date2.Date then
begin
messagedlg('开始时间不能大于结束时间。',mtinformation,[mbOK],0);date1.SetFocus;Exit;
end;
spt:=0;bjt:=0;tt:=0;
decodedate(date1.Date,y,m,d);decodetime(time1.Time,hh,mm,ss,ms);
str1:='#'+inttostr(m)+'/'+inttostr(d)+'/'+inttostr
![Thumbs up (y) (y)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f44d.png)
str1:=str1+' '+inttostr(hh)+':'+inttostr(mm)+':'+inttostr(ss)+'#';
decodedate(date2.Date,y,m,d);decodetime(time2.Time,hh,mm,ss,ms);
str2:='#'+inttostr(m)+'/'+inttostr(d)+'/'+inttostr
![Thumbs up (y) (y)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f44d.png)
str2:=str2+' '+inttostr(hh)+':'+inttostr(mm)+':'+inttostr(ss)+'#';
man.Query2.Close;
man.Query2.CommandText:='select * from sphisx where dd>='+str1+' and dd<='+str2;
showmessage(man.Query2.CommandText);//exit;
man.Query2.Open;
非常急!!!!!!!!!!!!!!!!!!!!!!!!!