以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 提示#号错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=26724) |
-- 作者:yuanxilin -- 发布时间:2012/12/12 16:19:00 -- 提示#号错误 Dim dt As Date = Date.Today.AddDays(30) Dim dr As DataRow = DataTables("员工档案").Find("合同到期 <= #" & dt & "#") If dr IsNot Nothing Then MessageBox.Show("有员工合同即将到期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Forms("员工档案").show() DataTables("员工档案").loadFilter = "合同到期 <= #" & dt & "#" DataTables("员工档案").load End If |
-- 作者:lin_hailun -- 发布时间:2012/12/12 16:23:00 -- 你的数据库是Sqlserver?如果是,#替换成\' |
-- 作者:sloyy -- 发布时间:2012/12/12 16:26:00 -- 应该是少了 \' Dim dr As DataRow = DataTables("员工档案").Find("合同到期 <= \' #" & dt & "#\' ") |