Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Just connect to a SQL table, and pull some data!

Reply
Thread Tools

Just connect to a SQL table, and pull some data!

 
 
David Lozzi
Guest
Posts: n/a
 
      08-09-2004
It use to be so easy in ASP, but now in ASP.NET i'm lost and confused.

I'm trying to connect to a SQL database, open a table via a SQL string. Then
take the returning recordset and do what I want to it: pull two fields, pull
all fields, loop through the recordset, etc.

But i'm lost...

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com



 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      08-09-2004
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in
news:#(E-Mail Removed):

> It use to be so easy in ASP, but now in ASP.NET i'm lost and confused.
>
> I'm trying to connect to a SQL database, open a table via a SQL
> string. Then take the returning recordset and do what I want to it:
> pull two fields, pull all fields, loop through the recordset, etc.
>
> But i'm lost...



Take a look at Microsoft's Data Access Application Block for .NET. These
classes should simplify data access greatly:

http://msdn.microsoft.com/library/de...l=/library/en-
us/dnbda/html/daab-rm.asp

But basically you:

1. Connect to the database
2. Create a Command object
3. Populate the Command Connect with SQL and Connection
4a. Execute the command object to return a data reader
4b. Create a DataAdapter to fill a dataset

Choose A or B depending if you want a datareader or dataset.

--
Lucas Tam ((E-Mail Removed))
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
weak pull up and pull down krithiga81@yahoo.com VHDL 2 06-28-2006 02:18 PM
NEWBIE - Learning how to pull SQL not in Grid or Details view Phillip Vong ASP .Net 1 02-24-2006 08:51 PM
Reposting question - How to pull filepath from SQL to use in slide =?Utf-8?B?UnVkeQ==?= ASP .Net 0 05-11-2005 03:48 PM
pull image file from SQL server then displayed in web browser Jason Java 1 04-20-2004 05:40 AM
Pull data to SQL Server Ce Vagelis ASP .Net Mobile 0 09-15-2003 08:09 AM



Advertisments