查询后 datagrid无法显示数据,为什么? 请指教。
vb5 写的程序原来可以在我的机器下可以正确在datagrid中显示查询结果,通过data控件连接,但在其他机器一直不行。
相关代码一直没有改动,但最近可能是删除了一些文件,现在我的机器上也不行了,看来是否与控件等有关?代码如下:
frmRecorder.Data1.RecordSource = "Select * From Recorder where val(Weekday) >= " & findStartWeekday & " and " & "val(Weekday) <= " & findEndWeekday & " and Content in " & varfindContentrange & " and Remark in " & varfindRemarkrange & " and RecordDate>= # " & DTPicker1.Value & "#" & " and RecordDate<= # " & DTPicker2.Value & "#" & " and Start>= # " & DTPicker3.Value & "#" & " and Start<= # " & DTPicker4.Value & "#" & " and Stop>= # " & DTPicker5.Value & "#" & " and Stop<= # " & DTPicker6.Value & "#"