如何使用Sql存储过程获取Vb.Net中的Checkedcombobox项目列表 [英] How Can I Get The List Of Checkedcombobox Items In Vb.Net Using Sql Stored Procedure

查看:89
本文介绍了如何使用Sql存储过程获取Vb.Net中的Checkedcombobox项目列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的示例代码是

my sample code is

dtStudentdept = ObjBc.StudentDept()
      gcStudentDetails.DataSource = dtStudentdept


      For Each Item As String In Me.dtStudentdept.GetCheckedItems
          Me.ChkDept.Items.Add("Mca")
          Me.ChkDept.SelectAllItemCaption = 0
      Next

< br $>


i无法进一步发展,因为它显示错误,GetCheckedItems不是一个memeber。我可以声明否则。显示列表。



i cant able to develop further because it shows error that GetCheckedItems is not a memeber.what can i declare otherwise.to show the list.

推荐答案

GetCheckedItems不是memeber

错误消息直接说明错误。 GetCheckedItems 不是CheckedComboBox的成员。



您可以在此处找到一些信息: CheckedCombobox控件 [ ^ ]



如果您想将已检查项目列表传递给存储过程,唯一的方法是传递输入参数 [ ^ ]( VARCHAR 数据类型)逗号分隔项目列表,然后您就可以在SP中使用它。有关详细信息,请参阅OriginalGriff的提示:使用逗号分隔值参数SQL IN子句中的字符串 [ ^ ]。



更多:

如何使用Visual Basic .NET在ASP.NET中调用SQL Server存储过程 [ ^ ]

如何:在存储过程和用户​​定义函数中使用参数 [ ^ ]
GetCheckedItems is not a memeber
The error message says directly what is wrong. GetCheckedItems is not a member of CheckedComboBox.

Some information you'll find here: CheckedCombobox Control[^]

If you would like to pass the list of checked items to the stored procedure, the only way is to pass input parameter[^] (VARCHAR data type) as a list of comma separated items, then you'll be able to use it in SP. For further information, please see OriginalGriff's tip: Using comma separated value parameter strings in SQL IN clauses[^].

More:
How to call SQL Server stored procedures in ASP.NET by using Visual Basic .NET[^]
How to: Use Parameters in Stored Procedures and User-Defined Functions [^]


这篇关于如何使用Sql存储过程获取Vb.Net中的Checkedcombobox项目列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆