If Not IsPostBack Then
iBind()
End If
Private Sub iBind()
Dim sqlconn As SqlClient.SqlConnection
Dim ds As DataSet
Dim da As SqlClient.SqlDataAdapter
ds = New DataSet
sqlconn = New SqlClient.SqlConnection("Server=.;pwd=sa;uid=sa;database=Northwind")
da = New SqlClient.SqlDataAdapter("select * from orders", sqlconn)
da.Fill(ds)
myGrid.DataSource() = ds
myGrid.DataBind()
End Sub
阅读(480) | 评论(0) | 转发(0) |