tags:

views:

1054

answers:

1

I am playing with wpf and when i have created database it is created with the .sdf files. I want to know details of .sdf files. How it is diffrent then the standard .mdf files and will they support linq to sql? Because i am not able to use it with linq files.

+4  A: 

An SDF file is a Sql Server Mobile file. It is also referred to as Sql Server compact. It is predominantly used in mobile development but recently more and more common in single user desktop developments as well.

Visual Studio 2008 does not support Linq to Sql for Sql Server Mobile but the Framework does. You can find out more on implementing this here

You can find more on Sql Server Mobile here. The link will also help explain the differences between this and Mdf's, used by Sql Server.

There is also an article on building a Linq to Sql model for Wpf using Sql Mobile/Compact here

One of the main differences between a Sdf and Mdf is that until recently an Mdf could not be opened and treated like a normal file, whereas an Sdf is accessed as a file. However in Visual Studio this concept was reproduced by allowing Sql Server Data files which dynamically attaches the Mdf to a Sql Server Express session.

Diago
I do believe that Sql Server Compact [Edtion] is the latest name (2008) and that it was called mobile in the 2005 era.
Henk Holterman
Microsoft's naming convention around Compact hasn't been very consistent and as far as I know your correct. The internal version description only changed in SP1 thought.
Diago