
December 29th, 2004, 01:43 PM
|
|
Contributing User
|
|
Join Date: Nov 2004
Location: Seattle, WA
Posts: 41
Time spent in forums: 6 h 13 m 28 sec
Reputation Power: 5
|
|
|
Visual Studio .NET, ASP.NET DataSet Fill Question...
I'm fairly new to Visual Studio .NET & ASP.NET and I had a question I was hoping someone could help me with. I'm simply attempting to display a database table in its entirety using a DataGrid.
I have a new Visual Basic ASP.NET Web Application and I have a database I'm connecting to. In Visual Studio, I use the 'Server Explorer' Pane on the left side to first connect to the database, then drag the table I'm working with into the Design window. This automatically creates a SqlDataAdapter & a SqlConnection object in the project. I then right-click on the SqlDataAdapter and click 'Create DataSet'. I then drag a 'DataGrid' object from the Toolbox pane on the left into the Design window. I then set this Grid's datasource to the DataSet I just created. I then right-click on the SqlDataAdapter and click 'Preview Data'. When the preview window comes up, before I can see everything I have to click the 'Fill DataSet' button. Once this is done, everything in the table is viewable and I'm good to go.
But when I run, or Debug, the project I simply get a blank page. So I go back to Visual Studio and drag a SqlCommand object into the project from the Toolbox pane. I then configure this properly, but I'm still getting the blank page.
I believe the problem I'm having is that my dataset is not 'Filling' automatically. And this is my question, is there a setting to 'Automatically Fill' my dataset with the SqlCommand object I added to the project, or is there some step that I'm missing or that I must add in order for my DataSet to be filled???
Any and all help/suggestions would be greatly appreciated! Thank you again!
~Currie
|