Dim Filter As String
With e.Form.Controls("TextBox1")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "[CardNo] = '" & .Value & "'"
End If
End With
With e.Form.Controls("SD")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "[FDateTime] >= #" & .Value & "#"
End If
End With
With e.Form.Controls("ED")
If .Value IsNot Nothing Then
If Filter >"" Then
Filter = Filter & " And "
End If
Filter = Filter & "[FDateTime] <= #" & .Value & "#"
End If
End With
DataTables("考勤数据").LoadFilter = Filter
DataTables("考勤数据").Load()
我这样的代码运行的时候提示这样的错误!
.NET Framework 版本:2.0.50727.3643
Foxtable 版本:2012.11.28.1
错误所在事件:
详细错误信息:
System.Data.OleDb.OleDbException: '#' 附近有语法错误。
在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
在 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
在 Foxtable.DataTable.Load(Boolean OllOl1OO)