Foxtable(狐表)用户栏目专家坐堂 → treeview 出错


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

主题:treeview 出错

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


加好友 发短信
等级:童狐 帖子:257 积分:1971 威望:0 精华:0 注册:2012/12/20 8:21:00
treeview 出错  发帖心情 Post By:2014/5/9 16:57:00 [显示全部帖子]

Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText = "SELECT GY_LZFS.FSMC, CP_CK01.SHSJ, CP_CPZD.CPBM, CP_CPZD.CPMC, CP_CPZD.CPGG, CP_CPZD.CPYS, CP_CPZD.CPDW, CP_CK02.DHDH, CP_CK02.CPSL, CP_CK02.JSJG, CP_CK02.JSJE, CP_JGXX.XSJG, CP_CK02.DHDH" _
                  & " FROM ((GY_LZFS INNER JOIN (CP_CK01 INNER JOIN CP_CK02 ON (CP_CK01.LZDH = CP_CK02.LZDH) And (CP_CK01.LZFS = CP_CK02.LZFS)) ON GY_LZFS.LZFS = CP_CK01.LZFS) INNER JOIN CP_CPZD ON CP_CK02.CPXH = CP_CPZD.CPXH) INNER JOIN CP_JGXX ON CP_CK02.CPXH = CP_JGXX.CPXH" _
                  & " WHERE (((GY_LZFS.FSMC)='销售出库') AND ((CP_JGXX.XSLX)=2) AND ((CP_CK01.DJZT)='AU'));"
dt = cmd.ExecuteReader()
Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1")
trv.BuildTree(dt,"SHSJ YM")
trv.Nodes.Insert("加载所有数据",0)

 

在窗体的afterload事件,加入上述代码,想按时间来显示,结果老提示  无效列名 SHSJ YM ,改成  trv.BuildTree(dt,"SHSJ") 这样不会提示,但是我要按月显示树,问题在哪里?


 回到顶部