Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 29th, 2004, 01:43 PM
Currie Currie is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: Seattle, WA
Posts: 41 Currie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old December 29th, 2004, 02:02 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
try downloading and reviewing my .NET tutorial for an example of filling a datagrid.
However, I don't fill it will drag and drop controls. I have actually written the code to do this.

Reply With Quote
  #3  
Old December 29th, 2004, 02:17 PM
Currie Currie is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: Seattle, WA
Posts: 41 Currie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 13 m 28 sec
Reputation Power: 5
Quote:
Originally Posted by Memnoch
try downloading and reviewing my .NET tutorial for an example of filling a datagrid.
However, I don't fill it will drag and drop controls. I have actually written the code to do this.

Thanks Memnoch, I should have stated before hand...but I can indeed get this working properly by coding my own setup & not using the drag & drop controls...but the purpose of my little exercise here was to try and figure out the drag and drop controls. Thus why I'd like to know how to use the SqlCommand object, etc and stuff. Thanks though

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Visual Studio .NET, ASP.NET DataSet Fill Question...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT