我要实现一个查询功能:在两个日期之间查找所需要的日期。程序段如下:
var
rq:string
begin
rq:='select * from persion where '''datetostr(DateTimePicker1.Date)+combobox3.text+'''出生日期'''+combobox3.text+datetostr(DateTimePicker2.date)'''';
.....
end;
combobox.text包括> < =
请问大虾,上面的程序段还有什么要改的。谢谢了!!
var
rq:string
begin
rq:='select * from persion where '''datetostr(DateTimePicker1.Date)+combobox3.text+'''出生日期'''+combobox3.text+datetostr(DateTimePicker2.date)'''';
.....
end;
combobox.text包括> < =
请问大虾,上面的程序段还有什么要改的。谢谢了!!
rq(动态) >=(动态) rq1.date
rq:string
begin
rq:='select * from persion where 出生日期 '
+ComboBox1.Text+QuotedStr(datetostr(DateTimePicker1.Date))
+' And 出生日期 '+ComboBox2.Text
+QuotedStr(DateToStr(DateTimePicker2.Date));
...........
End
可以实现你的要求。