I know there are similar questions, but I have a specific problem.
Microsoft Visual Studio (2017) pops up this error when I try to create a DB connection for my
Entity Data Model
The attempt to attach to the database failed with the following information: Login failed for user 'sa'.
What I've already checked:
sa user's password hasn't expired or isn't different than what I have specified.
sa user has not been disabled, either by being denied permission to connect to the database engine nor having the login disabled.
3) My instance of
SQL Server 2016 (Developer Edition) is configured for
4) SQL Server is running and I also can connect to it by
SQL Server Management Studio (v17.1) via
Windows Authentication as well.
What the problem could be?
I tried to create a DB connection, when adding
ADO.NET Entity Data Model -> EF Designer from database -> New Connection -> Microsoft SQL Server Database File (the SchoolDB.mdf wasn't attached to SQL Server... maybe this is the source of the problem)
To be honest, I tried to carry out the same action (make a connection to database (
SchoolDB.mdf) and attach the
SchoolDB.mdf file to SQL Server), and then Visual Studio gave me a hint:
The database file that you are attempting to connect is not compatible with the current instance of SQL Server.
Then VS suggested me to upgrade the database file (
After I'd done an upgrade of the *.mdf file (that I was trying to attach to SQL Server and make a connection to this DB after that), I could establish a connection to this database (already attached to SQL Server).
PS: I found out that
SchoolDB.mdf was created by
SQL Server 2012, while I tried to connect it to
SQL Server 2016.