Re: SQL CE Direct Access



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
>


.



Relevant Pages

  • Re: Where did the OleDB provider go?
    ... which consumes an sdf file right? ... the device sdf database, will help ... Hitchhiker's Guide to Visual Studio and SQL Server ...
    (microsoft.public.sqlserver.ce)
  • Re: Where did the OleDB provider go?
    ... you can help me on how to get data from my local SQL server to an SDF ... I access the database from a Win32 desktop app. ... Hitchhiker's Guide to Visual Studio and SQL Server ... the Datalink Properties Wizard does not show ...
    (microsoft.public.sqlserver.ce)
  • Re: Can I create a .net desktop app which can read SQL Server 2003 and create/populate SQL Server C
    ... >database, then creates and populates a SQL Server CE database (.sdf file). ... many/all of the other dll references are broken. ...
    (microsoft.public.sqlserver.ce)
  • Re: Creating SQL CE DB on desktop with data
    ... access the SDF) is supported only on device. ... this will change with SQL Server 2005 and SQLMobile coming later this year ... where the .SDF file becomes multi-user and multi-platform. ... > I would like to create an "sdf" SQL Server CE 2 database on a desktop ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: table
    ... used to populate "MainTable"?? ... It's not necessarily true that the MainTable was populated from SQL Server ... Statement or Query. ... database, is there a real-time data update ...
    (comp.databases.ms-access)