To access a .SDF file you do not need to use SQL server at all, SqlCE support is built into .NET
Just add a reference to the System.Data.SqlServerCe namespace and a
using System.Data.SqlServerCe;
to your code.
You then access the database via the SqlCeConnection and SqlCeCommand classes. There is a walkthrough
here: MSDN[
^]