Friday, July 31, 2009

I Want to Connect from C# application to Sql on another system?

i made a application in C# and now i want share database one system (like server) and application in other system in Lan can connect to this sql


i prefer to work sql2000

I Want to Connect from C# application to Sql on another system?
Yes you can do that but you have to create a database on other machine and change your Connection String accordingly.
Reply:The connection class that is used to connect to sql server takes connection-string as parameter.





you can change the connection string to make your application connect to SQL server on another machine.





best way would be if you make this connection string configurable through app.config file; then you won't have to recompile the code and just changing the connection-string in app.config file would enable your application to connect to any server on the LAN.





change the connection string


No comments:

Post a Comment