Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Aaron Selonke
Aaron Selonke
10,323 Points

Creating a .sdf (SQL Local Database file) in Visual Studios 2015

To get some background in the IDE I was doing a project from the 'Head Start C#' books. The project calls for the creation of a local database. ( .sdf extension) in the current 2015 version of Visual Studios available to add to a project.... How can it be done?

5 Answers

anil rahman
anil rahman
7,786 Points

This link helps walk you through it, should be very similar steps for 2015 :)

http://www.homeandlearn.co.uk/csharp/csharp_s12p1.html

Aaron Selonke
Aaron Selonke
10,323 Points

That tutorial makes a service-based database (.mdf file) I don't know how to make a local database (.sdf file)

Aaron Selonke
Aaron Selonke
10,323 Points

HI there, thanks for the info,

I can see in the tutorial, it is as easy as finding Local-Database in the IDE menu, but the Local-Database item is not there!

Screenshot http://uploadpie.com/eritO

Using VS 2015 community .NET Framework 4.6.1

anil rahman
anil rahman
7,786 Points

According to microsoft using service based database file is creating a local database file.

https://msdn.microsoft.com/en-us/library/ms233763.aspx