C# Database Programming for Beginners | Part 2 - Querying the Database with SQL

SeeSharpCode · 161K views · 2014 · 7:58

Open on YouTube

Databases & storageTesting, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users cite it when they are following the tutorial and get stuck on Visual Studio's New Query step, where their database is missing from the available databases list.

Recommended by 0 people across 0 different months, 2015 to 2016.

What it is

A short beginner tutorial from the SeeSharpCode channel, the second part of a C# database series. It shows how to use Visual Studio's built-in query tool to run raw SQL select, insert, update and delete statements against a database.

What people said

Cites arosamiran · 2015-10 · Stack Overflow · on “Can't perform a new query in Visual Studio against a database”

I have successfully created a sample server-based database in Visual Studio 2015 Community Edition with settings in Tools>Options>Data Tools>Data Connection under SQL Server Instance Name set to 'SQLEXPRESS'. However, upon performing a new query against the database, it displays this error: Msq 208, Level 16, State 1, Line 1 Invalid object name 'Recipe'. My query is this: SELECT * FROM Recipe My database is named as "Cookbook" with tables Recipe, Ingredient, RecipeIngredient. When initiating a query, in the Available Databases drop-down menu, the database I have created isn't listed. Is that possible? For Visual Studio to have created a database but not include it in the Available Databases

Cites liav bahar · 2015-12 · Stack Overflow · on “Fail to perform a new query in Visual Studio 2015 against a database”

I have successfully created a sample server-based database in Visual Studio 2015 Community Edition with settings in Tools>Options>Data Tools>Data Connection under SQL Server Instance Name set to 'SQLEXPRESS'. However, upon performing a new query against the database, it displays this error: Msq 208, Level 16, State 1, Line 1 Invalid object name 'Recipe'. My query is this: SELECT * FROM Recipe My database is named as "Cookbook" with tables Recipe, Ingredient, RecipeIngredient. When initiating a query, in the Available Databases drop-down menu, the database I have created isn't listed. Is that possible? For Visual Studio to have created a database but not include it in the Available Databases

Cites Noah Hornak · 2016-07 · Stack Overflow · on “Adding New Query to Database”

I am trying to follow this video [this video] and get stuck at 2:43 where he right clicks the database in server explorer and clicks 'New Query', once I do that it brings up the right sql file tab, but in the dropdown box where it has all the available databases, the one I created is not there, it only contains 'master, model, msdb, tempdb' I've tried searching for an answer and cannot find one.