Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends


I have an problem for connection with database using ASP.
i have my website in in one server and my database in another server. i want to access my database from another server. can anyone tell me link for that...!!



Thank You
Posted
Comments
[no name] 5-Oct-12 7:00am    
www.connectionstrings.com

1 solution

u can set following connection string in your web config file..
in ths string give your ip addresss of database server.


C#
<connectionstrings>
<add name="ConnectionString" connectionstring="Data Source=IP address of database;Connection Timeout=3600;Initial Catalog=Databasename;User ID=sa;Password=pwd" providername="System.Data.SqlClient" />
</connectionstrings>
 
Share this answer
 
Comments
Yatin chauhan 5-Oct-12 9:37am    
Thank You for Replay aysha.. This not aspx project. this is in asp pages...
i have .mdb file in my other server and my website in other server.. i want that database.

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