如何用 AccessDataSource 里的数据复值到 DataSet里 因为我想从AccessDataSource读取数据,因为只有先把数据复值到 DataSet里才能从 DataSet读取数据!请高手告知,谢谢!
解决方案 »
- 如何设置web用户控件的监视另一个控件的属性
- 请教个硬件问题,上次被人家嘲笑了
- 在GridView中,数据源无数据的时候如何显示新建按钮啊
- 如何在后台类中直接接受confirm及prompt返回的结果?
- 求论坛源代码,C#写的,简单一点的好,最好是sql数据库!!!
- “水晶报表”数据显示问题!
- ASP.NET中如何建立框架?
- 编译工程时提示"The file 'bin\WebErp.dll' cannot be copied to the run directory..."
- 高手指點一下!
- 請問有沒有辦法動態修改頁面位於瀏覽器上的標題
- asp.net 数据库备份相对路径问题
- 仿GOOGLE查询效果
从ACCESS数据库读的数据?
string strConnection =
ConfigurationSettings.AppSettings["ConnectionForKaoQin"];objConnection = new OleDbConnection(strConnection);其他做法跟我们平时对SQL数据库的操作一样
using System.Data.OleDb;
难道不能直接用 AccessDataSource 控件来操作然后把返回数据级再赋值到DataSet里然后对DataSet进行操作吗?
sSql = sSql & " select [UserID] "
sSql = sSql & " ,[Name] "
sSql = sSql & " from [User] "
sSql = sSql & " where [Leader] = no "
AccDataS.SelectCommand = sSql //sql语句Dim GV As GridView = New GridView
GV.DataSource = AccDataS
GV.DataBind() //绑定到 gridviewFor i As Integer = 0 To GV.Rows.Count - 1
DropDUserID.Items.Add(GV.Rows(i).Cells(0).Text.Trim().ToString)
DropDUserID.Items(DropDUserID.Items.Count - 1).Text = GV.Rows(i).Cells(0).Text.Trim().ToString
DropDUserID.Items(DropDUserID.Items.Count - 1).Value = GV.Rows(i).Cells(1).Text.Trim().ToString
Next i