Re: SQL CE Direct Access
- From: "Tim Brooks" <usna91@xxxxxxx>
- Date: Sat, 15 Oct 2005 10:03:35 -0700
Ramesh,
Direct methods for what? DML, DDL, data upload? Pete is right about the
namespace (in Compact Framework)...but if you're talking about populating
data, yes there are alternatives but, as with anything technical, it depends
on what you want to do. VS 2005 has an editor that can create a complete
sdf db on the desktop and populate records...but it only allows you do so
individually. It doesn't have any mass import capabilities. Sql2005 has
about the same level of capability. You can create but you can't import or
move data from somewhere else into your db.
There are also a number of tools that have been developed to allow you to
create and populate data on the desktop to an sdf file w/out using RDA or
replication. This is one that I like:
http://www.primeworks.pt/Products/DataPortWizard.html
Not sure if it has SqlMobile support yet.
Lastly, one other thing you can do...that I have done anyway...but is sort
of a hassle....You can use the new DTS tool in Sql Server 2005 to create a
workflow to move data from sql Server to an sdf database.
- Basically use Sql Server as your staging database.
- Use VS2005 server explorer or Sql Server 2005 to create your sdf file.
- Populate your data in Sql Server...
- ...then create a workflow in DTS to move data from Sql Server to sdf.
It isn't really documented but I have done it numerous times and it works.
Again, its a pain. If you're really just looking to fire up an initial
data load, I'd go with a tool like that above.....
Even though my app isn't intended to support replication in its current
version, I chose to use a publication to create the initial database for
shipping.....a side benefit is it'll support replication when I add it
later....I've tried several approaches but think that using publication is
the best overall. Its a major hassle to set-up but once you do, its very
easy to then just update the publication and then use your emulator or PPC
to go pull the latest version....which you can then save back to your
desktop for distribution prep.
One final related note, if you're making frequent changes to your structure
still, this is not a good route because while there are ways to change your
database and then push them to the client sdf db, it really doesn't work out
too well in general. Get your db as close as possible to its final design
before setting up replication. Or....you should do this anyway....save a
fresh copy of the db (on sql server) BEFORE setting up replication because
Sql Server adds a bunch of GUID columns (to support rep) to your tables and
then marks them as not editable....which, again, can be worked-around in
order to make changes post publication, but is a hassle and tends to leave
your database in an unstable state....
I hope I haven't given you too much info....but these are some of the
considerations....
tim
"Ramesh" <nramesh_98@xxxxxxxxx> wrote in message
news:eA5eHxX0FHA.3568@xxxxxxxxxxxxxxxxxxxxxxx
> Hi
>
> we are developing a few mobile apps using sql ce. we want to know if we
> can avoid using RDA or merge replication. Are there any direct methods we
> can use without them?
>
> TIA
> Ramesh
>
.
- Follow-Ups:
- Re: SQL CE Direct Access
- From: Joćo Paulo Figueira [eMVP]
- Re: SQL CE Direct Access
- References:
- SQL CE Direct Access
- From: Ramesh
- SQL CE Direct Access
- Prev by Date: PIVOT in SQLMobile??
- Next by Date: Re: SQLMobile Native OLE DB App Fails to Open database
- Previous by thread: Re: SQL CE Direct Access
- Next by thread: Re: SQL CE Direct Access
- Index(es):
Relevant Pages
|