0

Adding a table in the .dbml file by drag and drop in Visual Studio 2017 community edition generates this error.

Failed to retrieve data for this request. Failed to connect to server 10.1.2.3. Login failed for user 'user'.

I am able to log in and view the tables and views in the SQL Server Object Explorer.

NB: It was working on VS 2015 before updating. Adding SP still works.

FLash
  • 696
  • 9
  • 27
  • _Windows authentication_ or _user/password_? – schlonzo Apr 24 '18 at 14:08
  • user/password. When I use Windows authentication, it's working, but I need to use user/password. – FLash Apr 25 '18 at 05:18
  • Then it must be something with the authentication. Have you double checked, if the connectionstring in dbml designer file is correct and if the user (still) has rights to access the database? – schlonzo Apr 25 '18 at 05:25
  • Able to login in SQL Server Management Studio with the same credentials. Even able to view tables in VS SQL Server Object Explorer. – FLash Apr 25 '18 at 05:31
  • Uhm, that's really kind of weird then? Is your application working? Is it just a problem with adding a new table to dbml file? – schlonzo Apr 25 '18 at 05:44
  • The application is working. There are lots of old tables in the dbml. Problem is only with adding new tables. – FLash Apr 25 '18 at 10:16

1 Answers1

1

I encountered this same problem today in VS 2017 15.7.5. I right-clicked on the connection in the Server Explorer, opened the Modify Connection box and checked the Save My Password box and it began working again.

Bel
  • 186
  • 1
  • 5
  • I am currently using the SQL Server Object Explorer, not the Server Explorer. However, I added a new connection in Server Explorer with a checked Save My Password box and still the same error. – FLash Aug 22 '18 at 06:30
  • And it started working. Both in SQL Server Object Explorer and the Server Explorer. I think we need to wait for a minute too :) – FLash Aug 22 '18 at 06:33