0

I moved a webapp from my personal machine to my work machine, along with the database I've been using to test. When clicking the submit button that inserts the data, I get the error, can't find server/instance. I'm thinking that being on a domain here is part of the problem. Here is my connection string, and I've tried several forms of it already.

Data Source=\\bkirkland_lpt.domain.com\brandon;Initial Catalog=STATUS;integrated security=SSPI;persist security info=False;Trusted_Connection=Yes;");
1
  • 1
    That's not a valid Data Source. SQL Server isn't UNC. Commented Feb 13, 2012 at 20:07

3 Answers 3

1

I see a couple problems here.

First, it looks like you are using the wrong data source. The data source should be in the format [ServerName]\[InstanceName]. Based on your code, I would suggest

Data Source=bkirkland_lpt.domain.com\brandon;Initial Catalog=STATUS;integrated security=SSPI;persist security info=False;Trusted_Connection=Yes;

Additionally, I notice you are using Integrated Security. This means that the user you are running under must be granted permissions on the database. My guess is that your domain user does not have access to the database that you moved.

Sign up to request clarification or add additional context in comments.

2 Comments

I created the db and the instance. This is all on my local machine. My machine is bkirkland_lpt.
Removed slashes and it still doesn't work. I was able to add the db as a data connection with no problem. It shows up as, bkirkland_lpt\brandon
0

\bkirkland_lpt.servicesource.com\brandon is a shared folder path, not a host name. Try bkirkland_lpt.servicesource.com

2 Comments

The instance name is BRANDON.
anyway you should remove leading slashes
0

Try to enclose the server name in []. Try to replace the servername with localhost and see if it makes any difference (if it is all on your local machine). I also would use proper casing and True vs Yes as parameter value.

Data Source=[bkirkland_lpt.domain.com]\brandon;Initial Catalog=STATUS;Integrated Security=SSPI;Persist Security Info=False;Trusted_Connection=True;

Data Source=localhost\brandon;Initial Catalog=STATUS;Integrated Security=SSPI;Persist Security Info=False;Trusted_Connection=True;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.