Foxtable(狐表)用户栏目专家坐堂 → SQLJoinTableBuilder 数据源问题


  共有1799人关注过本帖树形打印复制链接

主题:SQLJoinTableBuilder 数据源问题

帅哥哟,离线,有人找我吗?
pizzahe
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:287 积分:2921 威望:0 精华:0 注册:2015/12/21 13:35:00
SQLJoinTableBuilder 数据源问题  发帖心情 Post By:2018/12/16 18:02:00 [显示全部帖子]

这个工具,从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


 回到顶部