How to create .sdf file

  • Thread starter Thread starter Rafael Metring
  • Start date Start date
R

Rafael Metring

How can I create one .sdf file.

I have my Database in Sql (mdf and ldf ) and I like know how to convert this
to .sdf file to use
in my new system in pocket..

Tanks Advanced.

Rafael
 
Rafael,

Generally sdf files need to be created on the device itself in the current
version of SqlCe. One approach is to export the data from your database into
XML and then write a little .NetCF app that reads the XML into a DataSet,
creates the sdf file and writes out the data. (You could also create the sdf
file on the emulator using the same approach.)

There is also a 3rd party product called RemoteSqlCe that allows you to
create sdf files on the device from a desktop app. There's more info here:
http://www.gui-innovations.com/html/remotesqlce.html
 
Considering MS want to keep the SQLCE code/format secret, how can a
third-party developer create such an application? I know you can investigate
the file format of the db and "reverse engineer" it from that, but this is
not a very safe/stable way of doing it, is it? On the other hand, with
sufficient testing (whenever that is) you could always come up with a "good
enough" application I guess...

/ Peter
 
The app in question still uses SqlServerCe to create its database file, what
it offers is the ability to create and manipulate the database remotely from
the desktop pc.

Peter
 
Back
Top