我爱Aspx >> Asp.Net >> 求用DataSet绑定DataGridView,实现动态加载数据的代码本人想写一个用DataSet绑定DataGridView的公共过程,然后在各窗体调用该过程,实现把数据读入到该窗本的DataGridView.
google_ad_width = 250; google_ad_height = 250; google_ad_format = "250x250_as"; google_color_url = "000000";
写了一点代码,但行不通.打开窗体后数据并没有在DataGridview显示,请各位指教
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
subShowDataGridview(DataGridView1, "Select * from table1", "连接数据库字符串")
End Sub
Public Sub subShowDataGridview(ByVal DataGridView As DataGridView, ByVal strCommandText As String, ByVal strConnectionSQLString As String)
Dim SqlConnection1 As New SqlConnection
Dim SqlDataAdapter1 As New SqlDataAdapter
Dim DataSet1 As New DataSet
SqlConnection1.ConnectionString = strConnectionSQLString
SqlDataAdapter1.InsertCommand.Connection = SqlConnection1
SqlConnection1.Open()
SqlDataAdapter1.InsertCommand.CommandText = strCommandText
Ҷƪл˵?
串口通讯中的7位数据位,和8位数..[07-06]
问一下,winform大家用何种方式显..[07-06]
把其他系统的数据转出成用友标准..[07-06]
向数据库中插入不了记录[07-06]
一个关于数据源的问题,目前还没有..[07-06]
谁有struts的数据库分页的例子,求..[07-06]
请问变量yxs1和yxs2在取出数据表..[07-06]
怎么在jsp中显示oracle数据库中的..[07-06]
datagrid数据导入Excel出错,请高..[07-06]
java读取txt,并解析成xml格式数据[07-06]
串口通讯中的7位数据位,和8位数..[07-06]
<^o^> 请问做[图形报表]有..[07-06]
三层结构搭建[07-06]
★急急急,各位给推荐个硬盘工具,..[07-06]
求ASP.NET办公自动化系统开发实例..[07-06]
如何控制窗体当前只有1个实例[07-06]
vc#写的winform程序很占内存,如..[07-06]
怎么让浏览器显示自己的html文档[07-06]
VB2005,如何搜索局域网上的SQL主..[07-06]
winform中如何把对话框参数传给父..[07-06]