Click here to Skip to main content
15,910,009 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how could i connect my project with database
Posted

Hi anusha504,

very first you need to understand for connection string for different kinds database access which are given below
http://connectionstrings.com/[^]

and after that refer below links also:
http://www.w3schools.com/aspnet/aspnet_dbconnection.asp[^]
http://msdn.microsoft.com/en-us/library/ms178371.aspx[^]
Connecting to MySQL database from your .NET applications.[^]
Find "Leaked" Database Connections in ASP.NET Web Applications[^]
 
Share this answer
 
there are too many methods to connect to database
few of them
1)use sqlclient and use manually commands..
2)use type dataset
3)linq to sql
 
Share this answer
 
Store your Connection string in web.config's Connectionstring Setting Section

<connectionstrings>
<add name="connectionname" connectionstring="Data Source=.;Initial Catalog=Dbname;User ID=sa;Password=123456">



and access it in your Web Page like
C#
string con= ConfigurationManager.AppSettings["connectionname"]



for more help
connection string
 
Share this answer
 
v2
To start with, read:
http://en.wikipedia.org/wiki/ADO.NET[^],
http://msdn.microsoft.com/en-us/library/aa286484.aspx[^], than follow references from these articles.

—SA
 
Share this answer
 
Follow steps to connection with database
connecting from a VS2008 project to SQL Server 2008 Express
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900