Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on a Windows Forms application in which the database will be on a server in the LAN and client access the database.

My Problem is I use DataSet to bind data to controls in some forms. So the connection string is already saved in settings. So when I try to access those forms connection error is displayed.

Is there any solution so that I can use DataSets to bind data and the connection string to the server can be given in the client machine while installing or running the application?

Advance Thanks. Please Help.
Posted
Updated 15-Feb-12 2:37am
v3
Comments
Herman<T>.Instance 15-Feb-12 6:14am    
'so when i try to access those forms connection error is displayed'

what error?

1 solution

Put your connection string in the app.config file and use it in the application. You can modify the app.config file (Your_Application_Name.config) on the client machine to change the connection string while deploying.
 
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