K
Kent Johnson
Hi all,
How can I get data to show in a datagrid?
This is what I have tested:
===============================
Dim ConnStr As String
ConnStr = "data source=MyServer;initial catalog=pubs;persist security
info=True;workstation id=LABSERVER;packet size=4096;user id=sa
Dim SQLSelect As String
SQLSelect = "SELECT * FROM Titles"
Dim mySqlConn As New System.Data.SqlClient.SqlConnection(ConnStr)
Dim mySqlDA As New System.Data.SqlClient.SqlDataAdapter(SQLSelect, ConnStr)
Dim myDS As New DataSet()
mySqlConn.Open()
mySqlDA.Fill(myDS)
DataGrid2.DataBind()
mySqlConn.Close()
================================
I get no errormessage.
What can be wrong?
/Kent J.
How can I get data to show in a datagrid?
This is what I have tested:
===============================
Dim ConnStr As String
ConnStr = "data source=MyServer;initial catalog=pubs;persist security
info=True;workstation id=LABSERVER;packet size=4096;user id=sa
Dim SQLSelect As String
SQLSelect = "SELECT * FROM Titles"
Dim mySqlConn As New System.Data.SqlClient.SqlConnection(ConnStr)
Dim mySqlDA As New System.Data.SqlClient.SqlDataAdapter(SQLSelect, ConnStr)
Dim myDS As New DataSet()
mySqlConn.Open()
mySqlDA.Fill(myDS)
DataGrid2.DataBind()
mySqlConn.Close()
================================
I get no errormessage.
What can be wrong?
/Kent J.