这个工具,从ACC数据源改成SQL数据源出错了,怎么解决
Dim jb As New SQLJoinTableBuilder("查询表1","YF_ChargeDetails")
jb.ConnectionName = dataName
jb.AddTable("YF_ChargeDetails","roomID","YF_room","ID")
jb.AddTable("YF_ChargeDetails","rentID","YF_rent","ID")
jb.AddCols("roomName as 房间名称" ,"roomType as 房间类型","custName as 客户名称","Tell as 电话","{YF_ChargeDetails}.addDate as 收费日期","Serial as 流水号","Startdate as 开始日期","Enddate as 结束日期","freeType as 费用类型","ChargeType as 收费类型","payment as 收款方式","freeName as 费用名称","price as 费用单价","shuliang as 数量周期","xiaoji as 费用小计","State as 费用状态","beizhu as 备注")
With Tables(e.Form.Name & "_Table1")
' Dim nf As String = Forms("工作主窗口").Controls("TJ_年份").Value
Dim year As Integer = 2018 'nf.Split(" ")(0)
Dim FirstDay As Date = New Date(year ,1,1) '第一天
Dim LastDay As Date = New Date(year ,12 ,Date.DaysInMonth(year ,12 ))
jb.Filter = "YF_ChargeDetails.addDate >= #" & FirstDay & "# and YF_ChargeDetails.addDate <= #" & LastDay & "#"
MessageBox.Show(jb.BuildSql)
.Fill(jb.BuildSql,dataName ,True)
Functions.Execute("TableDrow",.Name)
.AutoSizeCols(10)
End With