Dim d1 As WinForm.DateTimePicker = e.Form.Controls("Date开始日期")
Dim d2 As WinForm.DateTimePicker = e.Form.Controls("Date结束日期")
Dim cmd As new SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "sel ect * from {订单表} where 计划交期 >= '" & d1.Value & "' and 计划交期 <= '" & d2.Value & "' And 排产单号 Is not null"
dt = cmd.ExecuteReader
Dim tb As Table = Tables(e.Form.Name & "_Table1")
tb.DataSource = dt
老师,代码如上,如果数据多次加载进表(修改开始或结束日期时),会出现下面的错误
此主题相关图片如下:foxtable.png