以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  外部数据表刷新问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=81540)

--  作者:hzyt
--  发布时间:2016/2/29 23:02:00
--  外部数据表刷新问题

Dim dt As Date = Date.Today.AddDays(-7)
DataTables("订单出货表").LoadFilter = "制单日期> #" & dt & "#"
DataTables("订单出货表").Load()
With Tables("订单出货表")
    .Position = .Rows.Count - 1
End With

 

 

 

请问大师 以上代码运行时 显示(\'#\' 附近有语法错误),它错在哪?


--  作者:大红袍
--  发布时间:2016/2/29 23:10:00
--  

如果是sqlserver数据源,试试

 

Dim dt As Date = Date.Today.AddDays(-7)
DataTables("订单出货表").LoadFilter = "制单日期>\'" & dt & "\'"
DataTables("订单出货表").Load()
With Tables("订单出货表")
    .Position = .Rows.Count - 1
End With


--  作者:hzyt
--  发布时间:2016/3/1 8:56:00
--  
谢谢您大师,OK了