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.
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编辑过]