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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 4
    what error you are getting? – jjj Mar 16 '17 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` ? – Panagiotis Kanavos Mar 16 '17 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 – Panagiotis Kanavos Mar 16 '17 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 – marc_s Mar 16 '17 at 11:22

1 Answers1

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=*******;
Dmitry Bychenko
  • 180,369
  • 20
  • 160
  • 215
Rahul M
  • 91
  • 3
  • @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 Mar 16 '17 at 12:34
  • @marc_s oops, you are right. I never use such names for named instances so I got confused. – Panagiotis Kanavos Mar 16 '17 at 12:35