P
Peter.pan
Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi+ms sql server2000.在界面上放了两个DateTimePicker,有一table1,其中一个
字段为date1,现在要找出所有符合(date1>=DateTimePicker1.date) and
(date1<=DateTimePicker2.date)的纪录。
用adoquery查询:
adoquery1.close;
adoquery1.sql.text:='select * from table1 where (date1>=DateTimePicker1.date) and
(date1<=DateTimePicker2.date)';
adoquery1.open;
出现的问题:
当DateTimePicker1.date=DateTimePicker2.date时,库里有记录,但就是搜索不出来,请教各位
字段为date1,现在要找出所有符合(date1>=DateTimePicker1.date) and
(date1<=DateTimePicker2.date)的纪录。
用adoquery查询:
adoquery1.close;
adoquery1.sql.text:='select * from table1 where (date1>=DateTimePicker1.date) and
(date1<=DateTimePicker2.date)';
adoquery1.open;
出现的问题:
当DateTimePicker1.date=DateTimePicker2.date时,库里有记录,但就是搜索不出来,请教各位