Tuesday, March 20, 2012

ConnectionString

Thanks for the reply, this is what I have tried:

E134017 is the name of my computer on the LAN
\\E134017.nw.nos.boeing.com is the full path
I think also \\E134017 can also be used to identify my computer to others on the lan/

The following connection string will work on my workstation only, others computers cannot find it or sql won't honor their request for data.

con As New SqlConnection("Data Source=E134017;trusted_connection=true;Initial Catalog=Database1")

I have also tried this string which runs locally but not from another lan location.

con As New SqlConnection("Data Source=\\E134017.nw.nos.boeing.com;trusted_connection=true;Initial Catalog=Database1")

&

con As New SqlConnection("Data Source=\\E134017;trusted_connection=true;Initial Catalog=Database1")

Could I be having an authentication problem with other computers or does the trusted_source=true eliminate authentication as a problem.

Fred Herring

Fred,
The users may not be able to Authenticate against your machine - you can use a Connectioon string such as the following:
Dim con As New SqlConnection("DataSource=E134017;Initial Catalog=;User ID=sa;Password=mypassword")
using a SQL Server account to authenticate with and insure that you have access. I don't believe the \\ in front of your machine name is required.
Thanks,
Tyler

No comments:

Post a Comment