Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:日期报错如何解决

1楼
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.
2楼
狐狸爸爸 发表于: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编辑过]
3楼
有点蓝 发表于: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) 
共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01563 s, 2 queries.