.NET Framework 版本:2.0.50727.5477
Foxtable 版本:2014.7.21.1
错误所在事件:表,出仓,DataColChanged
详细错误信息:
调用的目标发生了异常。
表达式包含无效的字符串常量: '新厂'' and 日期 >= #2014-07-01# and 日期 < #2014-08-01#。
Select Case e.DataCol.Name
Case "数量","仓库","存货名称"
Dim fdr As DataRow = DataTables("盘点表").Find("存货名称 = '" & e.DataRow("存货名称") & "'")
For Each dr As DataRow In DataTables("盘点表").DataRows
dr("本月出库数量") = 0
dr("新厂借用数量") = 0
Next
If fdr IsNot Nothing Then
Dim d As Date = new Date(Date.Today.Year,Date.Today.Month,1)
fdr("新厂借用数量") = DataTables("出仓").Compute("sum(数量)","存货名称 ='" & e.DataRow("存货名称") & "' and 仓库 = '新厂'" & "' and 日期 >= #" & d & "# and 日期 < #" & d.AddMonths(1) & "#")
fdr("本月出库数量") = DataTables("出仓").Compute("sum(数量)","存货名称 ='" & e.DataRow("存货名称") & "' and 仓库 = '老厂'" & "' and 日期 >= #" & d & "# and 日期 < #" & d.AddMonths(1) & "#")
End If
End Select
请问我的代码哪错了,谢谢