Quick Search for:  in language:    
SQL,Stepbystep,instructions,connect,Server,fr
   Code/Articles  |  Newest/Best  |  Community  |  Jobs  |  Other  |  Goto  | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
.Net Stats

 Code: 140,189. lines
 Jobs: 383. postings

 How to support the site

 
Sponsored by:

 
You are in:
 

Does your code think in ink?
Login





Latest Code Ticker for .Net.
Click here to see a screenshot of this code!LAME .NET Decoder Component
By Jorge Rodrigues Silva on 11/28

(Screen Shot)

Ping multiple machines
By Juan Pieterse on 11/28


Create Charts with managed code using OWC10, and save as gif
By Juan Pieterse on 11/28


tungFlickeringL ight v1.0 (Active X)
By Nguyen Thanh Tung on 11/28


tungGradientPro gressBar v1.0
By Nguyen Thanh Tung on 11/28


tungDigitalWatc h v1.0
By Nguyen Thanh Tung on 11/28


CalcBytes
By Lewis Moten on 11/27


tungChronometer (ActiveX)
By Nguyen Thanh Tung on 11/27


tungActiveChart (ActiveX)
By Nguyen Thanh Tung on 11/27


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

Step-by-step connection to SQLServer from ASP.Net

Print
Email
 

Submitted on: 11/21/2003 4:21:04 PM
By: Irene V Yuzbasheva 
Level: Beginner
User Rating: By 1 Users
Compatibility:ASP.NET

Users have accessed this article 280 times.
 
 
     Step-by-step instructions on how to connect to the SQL Server from ASP.Net. Instructions include lots of screen shots in the zip file

This article has accompanying files
 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
Step-by-step Instruction on How to Connect to Microsoft SQL Server with ASP . Net Created by: Irene Yuzbasheva, 2003 1. Create an ASP.Net project. 2. In the Server Explorer, navigate to the SQL Server to which you want to connect to. 3. Drag and drop table or view on your *.aspx form. This automatically creates SqlConnection and SqlDataAdapter. 4. Right-click on the SqlAdapter1 and select Generate Dataset 5. This will create DataSet1 along-side with SqlConnection1 and SqlDataAdapter1. 6. Now you are ready to add data controls to your form. In this example, I will add Data Grid. Drag and drop DataGrid control from the Toolbox .. WebForms. 7. Double-click on the form and place code below under Page_Load function: SqlDataAdapter1.Fill (Me.DataSet11, "Companies") DataGrid1.DataSource = Me.DataSet11.Companies Page.DataBind () 8. Press F5 to test your creation

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/22/2003 12:29:39 PM:
This example adds nothing to the simple walkthrough built in tot Visual Studion and commonly quoted in many ASP.Net books and guides. It doesn't help if your server is remote or behind a firewall or otherwise not available in the Visual Studio server explorer. It also generates lots of extra code you may not want, in generating Insert, UPDATE and DELETE commands in addition to the needed SELECT command.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | .Net Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.