0

This is my connection string.

Data Source=.\MSSQLSERVER2012; Initial Catalog=admissio; Integrated Security=False; User ID=amedb; Password=*******; server=66.7.223.250;

I am trying to connect to a database but I'm unable to do so. Also I changed Data Source=66.7.233.250,8880; or server=66.7.233.250:8880; or server=66.7.233.250,8880;

Is any other way to connect database?

4
  • 4
    what error you are getting? Commented Mar 16, 2017 at 10:50
  • Why do you use server at all, when you ask to connect to a local database? Are you trying to connect to a named instance called MSSQLSERVER2012 on your local machine or a database on a remote server with IP 66.7.233.250 ? Commented Mar 16, 2017 at 10:53
  • Instead of writing the connection string by hand, add a Connection String setting in the project's Settings tab and edit it. This will display the connection dialog box that allows you to pick server, database, user and test the connection Commented Mar 16, 2017 at 11:02
  • You cannot have Data Source= and server= at the same time - these are synonyms - you need to use one or the other - but not both together Commented Mar 16, 2017 at 11:22

1 Answer 1

1

Try this:

Data Source=66.7.223.250; Initial Catalog=admissio; Integrated Security=False; User ID=amedb; Password=*******;

or

Data Source=66.7.223.250\MSSQLSERVER2012; Initial Catalog=admissio; Integrated Security=False; User ID=amedb; Password=*******;
Sign up to request clarification or add additional context in comments.

2 Comments

@PanagiotisKanavos: that is not correct - the default SQL Server service name for the default (unnamed) instance is always MSSQLSERVER (without any version numbers or anything)
@marc_s oops, you are right. I never use such names for named instances so I got confused.

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.