The web.config file stores the website configuration data, the connection string is used to store information on database connection.
The connection string to connect to a local sql server database is :-
<connectionStrings>
<add name="conn" connectionString="Data Source=.; Initial Catalog=DataBaseName; Integrated Security='True'" providerName="System.Data.SqlClient"/>
</connectionStrings>
The connection string to connect to a server :-
<connectionStrings>
<add name="conn" connectionString="Server=ServerAddress; Database=DatabaseName; User ID=userID; Password=password; Trusted_Connection=False" />
</connectionStrings>
The connection string to connect to a local sql server database is :-
<connectionStrings>
<add name="conn" connectionString="Data Source=.; Initial Catalog=DataBaseName; Integrated Security='True'" providerName="System.Data.SqlClient"/>
</connectionStrings>
The connection string to connect to a server :-
<connectionStrings>
<add name="conn" connectionString="Server=ServerAddress; Database=DatabaseName; User ID=userID; Password=password; Trusted_Connection=False" />
</connectionStrings>
No comments:
Post a Comment