如何手动从下拉列表中添加数据库中的数据 [英] how to add data from database in drop down list manually

查看:59
本文介绍了如何手动从下拉列表中添加数据库中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何手动从下拉列表中添加数据库中的数据?

我已将其添加为:

在数据库表名称tbldate中有字段一天,我必须手动添加所有这些日期:

dropdownlist1是下拉列表的id,dr是数据阅读器的对象,它从上面的表格中获取选择命令之后的值。

How to add data from database in drop down list manually?

I have added it as:
In the database table name tbldate there is field day and I have to add all these dates manually as:
dropdownlist1 is id for drop downlist and dr is object of data reader which get the value after select command from the above said table.

展开 | 选择 | Wrap | 行号

推荐答案

替换if(dr.Read())

to while(reader.Read())
replace if (dr.Read())
to while (reader.Read())


如果是previ ou记录必须阅读我们如何阅读是否有任何方法
if the previous record has to read how we can read is there any method for this


thanx亲爱的


这篇关于如何手动从下拉列表中添加数据库中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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