0

I created a dummy database that I filled with some values.

I did this in Management Studio. In parallel, I am creating a Windows Form Application where I will have buttons that will perform queries on the database I created in Management Studio.

However, I can't find a way to link the database in Management Studio to Visual Studio.

Any help? Thanks.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Ralph
  • 2,959
  • 9
  • 26
  • 49
  • View -> Server Explorer -> Right Click DataConnections -> Add Connection, fill the required fields. – Steve Jul 03 '14 at 13:56
  • The problem is I can't find the database file that I created in management studio – Ralph Jul 03 '14 at 13:59
  • You shouldn't need to directly access the database file as you would if you had created an Access database. You are connecting to the database service, you need to select the connection type of SQL Server. – Phill Jul 03 '14 at 14:07
  • @Ralphyabro In SQL Server, you create a database by providing a name. This name is then used to refer to the database. In any fully-blown RDBMS, the user is not concerned with the specifics of physical file containing the database. Instead, the physical storage is concealed from you so that you can concentrate on entities/data models or in other words tables and columns. – Satwik Nadkarny Jul 03 '14 at 14:20

1 Answers1

0

In Visual Studio, you will have to first select the View option from the "Menu" button. There you will have to select the Server Explorer option. Right-click Data Connections and select Add Connection. Here, you will have to provide they login credentials that are needed by that installation of SQL Server. Once you have done that, test you connection by clicking Test Connection. If the Test Connection succeeds, you will then be able to select your database from the Select or enter a database dropdown.

Hope this helps!!!

Satwik Nadkarny
  • 5,086
  • 2
  • 23
  • 41