Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to open *.sdf files?

I used to open sdf (sqlCE) files with visual-studio? or sql-server? I really don't remember. Now I can't open this sdf file. With what program do I need to open it?

like image 935
Gold Avatar asked Mar 03 '10 21:03

Gold


People also ask

What program can I use to open SDF files?

You can open an SDF file with several programs, including Microsoft Visual Studio and LINQPad. To open an SDF file with Visual Studio, select View → Server Explorer → Data Connections → Add Connection..., change the data source to "Microsoft SQL Server Compact," click Browse..., and select the SDF file.

What is .sdf Database file?

What is an SDF file? A file with . sdf extension contains the Microsoft SQL Server Compact (SQL CE) database which is also known as a compact relational database; produced by Microsoft for the applications made for mobile devices and desktops.

What is a SDF file extension?

The Spatial Data File (SDF) is a single-user geodatabase file format developed by Autodesk. The file format is the native spatial data storage format for Autodesk GIS programs MapGuide and AutoCAD Map 3D.


2 Answers

Try LINQPad, it works for SQL Server, MySQL, SQLite and also SDF (SQL CE 4.0). Best of all it's free!

LINQPad

Steps with version 4.35.1:

  1. click 'Add Connection'

  2. Click Next with 'Build data context automatically' and 'Default(LINQ to SQL)' selected.

  3. Under 'Provider' choose 'SQL CE 4.0'.

  4. Under 'Database' with 'Attach database file' selected, choose 'Browse' to select your .sdf file.

  5. Click 'OK'.

  6. Voila! It should show the tables in .sdf and be able to query it via right clicking the table or writing LINQ code in your favorite .NET language or even SQL. How cool is that?

like image 151
Chris Voon Avatar answered Sep 23 '22 04:09

Chris Voon


It's a SQL Compact database. You need to define what you mean by "Open". You can open it via code with the SqlCeConnection so you can write your own tool/app to access it.

Visual Studio can also open the files directly if was created with the right version of SQL Compact.

There are also some third-party tools for manipulating them.

like image 29
ctacke Avatar answered Sep 24 '22 04:09

ctacke