'How to fix the SQL error message 208 in Visual Studio 2019

This is my first time using SQL Server and I am planning to make a WPF C# application that connects to SQL Server to save users and other data. I was following a Youtube video tutorial but I came up with this problem when trying to test the data within my tables:

enter image description here

I am trying to display the data within my 'Accounts' table through this query

I have tried looking up the problem and the first thing that came up was that "master" was wrong, I selected msdb instead, however it did not fix the problem

This might be a very simple problem but this is my first time using SQL and databases.

UPDATE: I did

DB_NAME()

and it came back as 'master'

Help would be much appreciated!



Solution 1:[1]

At the top, in dropdown select your 'database name' instead of 'master database'. I guess Accounts table is in Database1.mdf. Please select Database1.mdf.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Divya Varada