以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 日期报错如何解决 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=193326) |
-- 作者:lin98 -- 发布时间:2024/9/5 15:35:00 -- 日期报错如何解决 Dim StartDate As Date = e.Form.Controls("StartDate").Value Dim EndDate As Date = e.Form.Controls("EndDate").Value Dim db = HySq-l.DataBaseFactory.CreateDatabase("t4") Dim Sq-l = "Selec-t " & _ "a.单号,a.编号, a.品名b.客户, b.制单日期,b.UESID " & _ "From " & _ "表b as a " & _ "Inner Join " & _ "表b as b " & _ "On " & _ "(a.单号 = b.单号) " & _ " Where " & _ "b.UESID = ? And (b.制单日期 >= ? And b.制单日期 <= ? );" Dim dt As System.Data.DataTable = db.ExecuteDataSet(Sq-l, HySql.ParameterPair.GetPair("b.UESID", _UESID), HySql.ParameterPair.GetPair("b.制单日期", StartDate), HySql.ParameterPair.GetPair("b.制单日期", EndDate)).Tables(0) 详细错误信息: Parameter \'b.制单日期\' has already been defined.
|
-- 作者:狐狸爸爸 -- 发布时间:2024/9/5 16:26:00 -- Dim dt As System.Data.DataTable = db.ExecuteDataSet(Sq-l, HySql.ParameterPair.GetPair("b.UESID", _UESID), HySql.ParameterPair.GetPair("b.制单日期1", StartDate), HySql.ParameterPair.GetPair("b.制单日期2", EndDate)).Tables(0) 不行就问开发商如何解决这种命名冲突
[此贴子已经被作者于2024/9/5 16:26:23编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/9/5 21:53:00 -- Dim dt As System.Data.DataTable = db.ExecuteDataSet(Sq-l, HySql.ParameterPair.GetPair("b.UESID", _UESID), HySql.ParameterPair.GetPair("制单日期1", StartDate), HySql.ParameterPair.GetPair("制单日期2", EndDate)).Tables(0) |