Click here to Skip to main content
15,885,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have created one small application.

It is working fine in local system, but I am going to configure my application to LAN, so I need to change my SQL connection string I think.

This is my connection string for connecting locally:
VB
con = New SqlConnection("Password=frogy@123;Persist Security Info=False;User ID=sa;Initial Catalog=frogy;Data Source=SAMEER-PC\SQLEXPRESS")


How do I have to modify my connection string to make it work in LAN environment?


Thank you!
Posted
Updated 13-Dec-10 0:08am
v3
Comments
Dalek Dave 13-Dec-10 6:08am    
Minor Edit for Grammar and Readability.

also look at Connection Strings[^]
 
Share this answer
 
If you want to use SQLExpress in a LAN environment where the application is running on different server as where the database is running, you'll have to enable SQLExpress for remote access:

Read all about it here: http://blogs.msdn.com/b/sqlexpress/archive/2005/05/05/415084.aspx


If SAMEER-PC is the network name of the computer you intend to run the SQLExpress DB on, your connection string should be fine.


Cheers,


Manfred
 
Share this answer
 
v2
Comments
sameertm 12-Dec-10 10:46am    
My Server Pc name is SAMEER-PC only, then can u please tell me how should be the connection string
Manfred Rudolf Bihy 12-Dec-10 11:18am    
As I wrote in my answer, your connection string is fine. Did you already follow the instructions behind my link to make your SQLExpress DB remotely accessible?

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