|
-
Aug 5th, 2011, 03:31 PM
#1
Thread Starter
Fanatic Member
Connecting to SQL Server
A couple of questions. Can you connect to a SQL Server in ASP.NET?
If so how?
-
Aug 5th, 2011, 04:57 PM
#2
Sleep mode
Re: Connecting to SQL Server
-
Aug 8th, 2011, 01:18 AM
#3
Re: Connecting to SQL Server
Question 1: Yes.
Question 2: It depends 
Out of the box, ASP.Net ships with a number of controls that allow you to directly bind your UI elements to a SQL Server Database. This is done using a server control called SqlDataSource. This control is fine for getting started, but for the longer term, it really isn't recommended.
Instead, you should be looking to use ADO.Net, using classes like SqlConnection, SqlCommand, etc. For information on how to do this, check out the ADO.Net links in my signature.
There are also, other newer ways of doing this, using things like LINQ to SQL and the Entity Framework.
If you provide more information about what exactly you are trying to achieve then the best course of action can be recommended.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|