'查询最近结欠银料日期
Dim ld1 As Date
Dim cmd1 As New SQLCommand
cmd1.C">cmd1.CommandText = "查 max(smartDate) From {R04_CheckMaterialDetail} Where checked='true' and warehouseCode like '03.%'"
ld1 = cmd1.ExecuteScalar()
MessageBox.Show(""& ld1 &"")
Dim cbfb As New SQLCommand '成本分布表
Dim cb As DataTable
cbfb.C">cbfb.CommandText = "查 warehouseCode AS 供应商代码,warehouseName AS 供应商名称 From {R04_CheckMaterialDetail} Where checked='true' and warehouseCode like '03.%' And
smartDate=#" & ld1 & "#"
cb = cbfb.ExecuteReader()
For Each dr As DataRow In cb.DataRows
Dim nr As DataRow = DataTables("账期统计").AddNew()
For Each dc As DataCol In cb.DataCols
nr(dc.name) = dr(dc.name)
Next
Next
.NET Framework 版本:2.0.50727.8806
Foxtable 版本:2018.10.9.1
错误所在事件:
详细错误信息:
'23' 附近有语法错误。
老师帮看下红字部分关于日期变量的引用是有什么错误
执行报错如下
.NET Framework 版本:2.0.50727.8806
Foxtable 版本:2018.10.9.1
错误所在事件:
详细错误信息:
'23' 附近有语法错误。
去掉红字部分就正常
[此贴子已经被作者于2021/7/28 15:59:23编辑过]