|
-
Mar 17th, 2009, 03:58 AM
#1
Thread Starter
New Member
Connect to SQL Server from win form over LAN
how my connection string should be if i want to access remote(within out local network) sql sever from a win form?
-
Mar 17th, 2009, 04:30 AM
#2
Re: Connect to SQL Server from win form over LAN
Hey,
Have a look at the connectionstrings link in my signature, you should be able to find the answer there.
Hope that helps!!
Gary
-
Mar 17th, 2009, 04:53 AM
#3
Thread Starter
New Member
Re: Connect to SQL Server from win form over LAN
i am able to connect this database from aspx web page.
i have connection string saved in the web config file.
-
Mar 17th, 2009, 04:54 AM
#4
Re: Connect to SQL Server from win form over LAN
Hey,
Were you asking a question there?
Gary
-
Mar 17th, 2009, 05:31 AM
#5
Thread Starter
New Member
Re: Connect to SQL Server from win form over LAN
sorry, i like to know is this ok,
strConnection = ("Driver={SQL Server};Server=xxx.xxx.x.xx;"
"Trusted_Connection=no;"
"Database=MyDatabaseName;Uid=MyUserName;Pwd=MyPassword;");
-
Mar 17th, 2009, 05:34 AM
#6
Re: Connect to SQL Server from win form over LAN
Hey,
So which part of that is not discussed here:
http://www.connectionstrings.com/sql-server-2005#1
Gary
-
Mar 18th, 2009, 12:50 AM
#7
Thread Starter
New Member
Re: Connect to SQL Server from win form over LAN
i used this one:
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
but still i am getting remote connection not allowed error.
from surface area configuration i have enabled remote connection(TCP/IP and named pipes)
added sqlserver.exe to windows firewall.
why am i still unable to connect to db?
-
Mar 18th, 2009, 01:39 AM
#8
Re: Connect to SQL Server from win form over LAN
Hey,
Have you also checked this section of the connectionstrings website?
http://www.connectionstrings.com/Art...twork-protocol
Also, are you getting an error returned? If so, what is it?
Gary
-
Mar 18th, 2009, 01:44 AM
#9
Thread Starter
New Member
Re: Connect to SQL Server from win form over LAN
thanks you so much for replying, i ma going to try it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|