以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  请教代码问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=153150)

--  作者:昱飞哥
--  发布时间:2020/8/1 21:54:00
--  请教代码问题
Dim y As Integer = Date.Today.Year
Dim d1 As New Date(y, 1,1)
Dim d2 As New Date(y, 12,31)
Dim dt5 As List(of DataRow) = DataTables("销售合同编号表").Select("[创建时间] >= #"&d1&"# And [创建时间] <= #"&d2&"#")   \'查找"销售合同编号表中"的"创建时间"为今年的所有行
e.Form.Controls("Label10").text = dt5.count           \'label10自动写入行数



请教上述代码哪里有问题?

--  作者:有点蓝
--  发布时间:2020/8/2 10:34:00
--  
提示什么错误?

Dim dt5 As List(of DataRow) = DataTables("销售合同编号表").Select("[创建时间] >= #" & d1 & "# And [创建时间] <= #" & d2 & "#")