Creating SQL CE DB on desktop with data

J

j.edwards

Hi,

I would like to create an "sdf" SQL Server CE 2 database on a desktop server
(from a webservice call).
This means, instead of sending records down to the device and having the
device run INSERT statements, it can just download a "prepackaged" database.
The db needs to be created on the fly as it will be specific to the device
requesting it - i.e. so I don't want a manual way to do it.

Is this possible, if so how? Thanks.
 
A

Arun

Hi,

I Understood like this, You have some specific static tables, which
need not be created again with insert statements in device.
For that create the table in device with a sample application use RDA
to pull the tables that needed and close the connection. Now you can
find the sdf file created with all static tables and lookup tables,
download the sdf through Active sync to desktop.
Add this sdf file to the smartdevice project and make Build Action to
content.
Then whenever you run the application you get the sdf created with the
static table.

Hope this helps,

Regards,
Arun.
www.innasite.com

This posting is provided "AS IS" with no warranties, and confers no
rights.
 
D

Darren Shaffer

there's no way to generate SQL Server CE 2 database (.SDF) files on a
server at runtime. System.Data.SqlServerCe (which is required to create and
access the SDF) is supported only on device. there are some third party
tools
that allow you to work with SDFs on the desktop in an interactive mode, but
it
sounds like you want to generate SDFs on the fly with programmatic control.

this will change with SQL Server 2005 and SQLMobile coming later this year
where the .SDF file becomes multi-user and multi-platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top