I built a test web app that connects to a SQL DB and displays certain items. I used pubs database to test. I set up the Data Connection using Server Explorer (tested good), then pulled the authors table in to the form. This set up the SqlConnection and the SqlDataAdapter. I created the DataSet. I then put on the form a Data Grid and set up the DataSource and DataMember to point to the DataSet and the table authors. I then put in this code to load the Data Grid.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
DataSet31.Clear()
SqlDataAdapter1.Fill(DataSet31)
End Sub
When I run it, the web page shows up but no data from the DB. The Data Grid does not show up at all.
Now, I do the exact same thing but this time using a VB.Net project (not web based) and it works just fine.
Any ideas as tho what may be wrong? I believe it should work the same for both the web based app and a normal VB app.
TIA
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
DataSet31.Clear()
SqlDataAdapter1.Fill(DataSet31)
End Sub
When I run it, the web page shows up but no data from the DB. The Data Grid does not show up at all.
Now, I do the exact same thing but this time using a VB.Net project (not web based) and it works just fine.
Any ideas as tho what may be wrong? I believe it should work the same for both the web based app and a normal VB app.
TIA