在窗体中的两个TEXT控件中分别输入开始日期与结束日期来对数据库进行日期查询.可我试了多种方法都不行,提示语法错误,语句为红色部分.但是这种方法在ACCESS中能够查询.请各位大虾帮忙了
Public cnn As New ADODB.Connection
Public rs As ADODB.Recordset
Public cnstr As String
cnstr = "Provider=MSDASQL.1;Driver=Microsoft Visual Foxpro Driver;SourceDB=" & App.Path & ";SourceType=DBF;"
Set rs = New ADODB.Recordset
cnn.Open cnstr
rs.CursorLocation = adUseClient
rs.Open "select 文件名 from 表1 where 日期 between # " & Trim(Text3.Text) & " # and # " & Trim(Text3.Text) & " # ", cnn, 3, 3
Set DataGrid1.DataSource = rs
DataGrid1.SetFocus
End Sub
[求助]VFP中的日期查询应该怎么写