如何在vb.net中的一个名称下将所选列表框值添加到db中 [英] How to add the selected listbox values into db under one name in vb.net
本文介绍了如何在vb.net中的一个名称下将所选列表框值添加到db中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想将所选项目值保存到产品-d,
然后文本框名称Product-d也必须添加到产品列表中。
我需要一个查询来插入这些值在VB.NET中使用mysql db。
问候,
Leema
解决方案
我建议如下:
对于 i = 1 要 myListBox.Items.Count
如果 myListBox.GetSelected(i - 1 )然后
Textbox_Product.text + = myListbox.Item(i-1)+ vbCrLf
结束 如果
下一步
Hi everyone,
I wants to save the "selected Items" values into the name of "Product-d",
then the text box name "Product-d"has to add in the "product list" also.
I need a query to insert these values in VB.NET using mysql db.
Regards,
Leema
解决方案
I would suggest the following :
For i = 1 To myListBox.Items.Count If myListBox.GetSelected(i - 1) Then Textbox_Product.text += myListbox.Item(i-1) + vbCrLf end if Next
这篇关于如何在vb.net中的一个名称下将所选列表框值添加到db中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文