Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can i give connection string to connect to sql server on server at 113.30.141.10
i create database and table on that server.
currently i am give local connection string as in Ms acess
C#
const String ConnectionStringSampleDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\ProjectDatabase\\CorporateDatabase1.mdb;Persist Security Info=True";


how can i give connection string that i connect to sql server on ser at perticular IP
Posted
Updated 25-Sep-12 19:30pm
v2

 
Share this answer
 
Comments
16041984 26-Sep-12 1:48am    
thx
Add following setting to your web config file..
C#
<connectionstrings>
<add name="ConnectionString" connectionstring="Data Source=113.30.141.10;Connection Timeout=3600;Initial Catalog=Databasename;User ID=test;Password=test" providername="System.Data.SqlClient" />
</connectionstrings>
 
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