Sunday, 13 December 2015

Simple Connection String in web.config

A connection string is used to connect the Application to Database.

in .net a simple connection string is written as

 <connectionStrings> 
    <add name="DefaultConnection" connectionString="Data Source=Admin-PC\TALENTADMIN; Initial Catalog=OnlineAppDB1; User ID=sa; Password=t@l3nt" providerName="System.Data.SqlClient" />
  </connectionStrings>


where
'name' is the name of connection string
''Data Source' is the name of server where your database is generated.
'Initial Catalog' is the name of your database.
'User ID' is the user ID for the  server
'password' is the key to enter the datbase.
'providerName' is the provide of database like  for sql server it is 'SqlClient'

No comments:

Post a Comment