There are a lot of examples demonstrating how to connect to ms sql database from windows form application using Visual Studio Professional (right-clicking on the project name -> "Add" ->"new item" -> "LocalDatabase" -> give a name with .sdf extension to the newly created database - > and so on )

My question is : 1) how to do it in Express Edition (i couldn't find it anywhere) 2) in the example above i'd like to add an already existing database .mdf (not to create a new one)

Recommended Answers

All 2 Replies

SQL Server connection strings

In addition, searching for one or more of the following should be helpful: SqlConnection, SqlCommand, DataTable, DataSet.

Ditto cgeier. I'm not a fan of directly managing data sources in Visual Studio; it just feels too inflexible compared to doing it manually with ADO.NET.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.