如何将ListBox的多个选定项目插入MS-Access数据库...请发送编码.. [英] How to insert multiple selected items of ListBox into MS-Access database...Please send the codeing ..
本文介绍了如何将ListBox的多个选定项目插入MS-Access数据库...请发送编码..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将ListBox的多个选定项目插入MS-Access数据库...请发送编码..
解决方案
请在下面找到代码如下
foreach (ListItem item in ListBox1.Items)
{
// 检查项目是否为然后选择然后取值并发送到数据库
if (item.Selected)
{
string value = item.Value;
string text = item.Text;
// 在此处插入数据库显示演示
/// Dal.InsertMethod(value,text);
}
}
是
你在哪里更新代码?
How to insert multiple selected items of ListBox into MS-Access database...Please send the codeing ..
解决方案
Please find the way codes are following below
foreach (ListItem item in ListBox1.Items) { //Check if items is selected then take it's value and send to database if (item.Selected) { string value = item.Value; string text = item.Text; //Make insert to databse here showing demo ///Dal.InsertMethod(value,text); } }
Yes
Where is you updated code ?
这篇关于如何将ListBox的多个选定项目插入MS-Access数据库...请发送编码..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文