以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]组合框 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=106538) |
||||
-- 作者:江南小镇 -- 发布时间:2017/9/11 11:01:00 -- [求助]组合框 老师好,我用黄绿色的代码怎样引用进去。 e.Form.Controls("ComboBox6").ComboList = gy1.GetComboListString("姓名") \'应聘信息_部门-采购部
|
||||
-- 作者:有点甜 -- 发布时间:2017/9/11 11:27:00 -- Dim khgy1 As New SQLCommand Dim gy1 As DataTable khgy1.ConnectionName = "数据库" khgy1.CommandText = "SELECT DISTINCT 应聘信息_部门,姓名 From {员工登记表} where 应聘信息_部门 = \'库管员\'" gy1 = khgy1.ExecuteReader e.Form.Controls("ComboBox5").ComboList = gy1.GetComboListString("应聘信息_部门") \'部门-库管员 e.Form.Controls("ComboBox6").ComboList = gy1.GetComboListString("姓名") \'应聘信息_部门-采购部 [此贴子已经被作者于2017/9/11 11:27:04编辑过]
|
||||
-- 作者:江南小镇 -- 发布时间:2017/9/11 11:54:00 -- 我不是这个意思,我是要把两组代码合并起来。
|
||||
-- 作者:有点甜 -- 发布时间:2017/9/11 12:07:00 -- Dim khgy1 As New SQLCommand Dim gy1 As DataTable khgy1.ConnectionName = "数据库" khgy1.CommandText = "SELECT DISTINCT 应聘信息_部门+\'-\'+姓名 as 新列名 From {员工登记表} where 应聘信息_部门 = \'库管员\'" gy1 = khgy1.ExecuteReader e.Form.Controls("ComboBox5").ComboList = gy1.GetComboListString("新列名") |
||||
-- 作者:江南小镇 -- 发布时间:2017/9/11 12:44:00 -- 我是想把两组或两组以上的代码合并起来分别赋值给每个组合框。
|
||||
-- 作者:有点甜 -- 发布时间:2017/9/11 14:23:00 -- Dim khgy1 As New SQLCommand Dim gy1 As DataTable khgy1.ConnectionName = "数据库" khgy1.CommandText = "SELECT DISTINCT 姓名 From {员工登记表}" gy1 = khgy1.ExecuteReader e.Form.Controls("ComboBox5").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'库管员\'") \'部门-库管员 e.Form.Controls("ComboBox6").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'采购部\'") \'部门-采购部 |
||||
-- 作者:江南小镇 -- 发布时间:2017/9/11 14:51:00 -- 老师,报错 以下是引用有点甜在2017/9/11 14:23:00的发言: Dim khgy1 As New SQLCommand Dim gy1 As DataTable khgy1.ConnectionName = "数据库" khgy1.CommandText = "SELECT DISTINCT 姓名 From {员工登记表}" gy1 = khgy1.ExecuteReader e.Form.Controls("ComboBox5").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'库管员\'") \'部门-库管员 e.Form.Controls("ComboBox6").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'采购部\'") \'部门-采购部 .NET Framework 版本:2.0.50727.3655 Foxtable 版本:2017.4.22.1 错误所在事件:窗口,出库,AfterLoad 详细错误信息: Cannot find column [应聘信息_部门]. |
||||
-- 作者:有点甜 -- 发布时间:2017/9/11 14:52:00 -- Dim khgy1 As New SQLCommand Dim gy1 As DataTable khgy1.ConnectionName = "数据库" khgy1.CommandText = "SELECT DISTINCT 应聘信息_部门,姓名 From {员工登记表}" gy1 = khgy1.ExecuteReader e.Form.Controls("ComboBox5").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'库管员\'") \'部门-库管员 e.Form.Controls("ComboBox6").ComboList = gy1.GetComboListString("姓名","应聘信息_部门 = \'采购部\'") \'部门-采购部 |
||||
-- 作者:江南小镇 -- 发布时间:2017/9/11 17:09:00 -- 谢谢老师 |