How to Synch up a device and desktop

R

Ramjee Tangutur

Hi All

We have a pocket PC application developed in CF. It has a SQL CE database.
Whenever the device is cradled, I would need to synch-up the data between
the device and the MSDE database on the desktop. There are some pre-existing
APIs on the desktop developed in Managed Code which should be used to update
the MSDE database.
Kindly give me some pointers/code snippets to achieve this. I would
specifically like to know the following.

1. How will the desktop application be able to find out, if the device is
cradled?
I am planning to use the OpenNETCF.Desktop.Communication.dll and the
methods provided in this to determine if the device is cradled and if active
sync is active?

2. How should I open the SQL CE Database on the device from the desktop App?
Any code snippets or pointers will be of great help. Or atleast I should
have a mechanism to get the data from the SDF file(on the device) in XML
format, to the desktop application.

3. How do I push data back to the PPC?

Please note I am using PPC 2003, .NET CF 1.x and SQL CE 2.0.

Any pointers would be of great help. Please cc your responses to
(e-mail address removed)

Thanks
Ramjee
 
A

Arun

Hello Ramjee,

You have lot of options for synchronizing data.

Need to first choose whether you are going to sync data with your
desktop database and PPC database. If you are using SQL Server/MSDE you
have
options like


1. Directly Querying SQL Server/MSDE using SqlClient (Bit Slow while
connecting)
2. RDA or Merge Replication of SQL CE (RDA is Good to start with, merge

replication is little difficult to setup but easy to implement)
3. Web Services (Comparitively Slow)

RDA and Web Services seems to be similar when the size of data is
minimal. If you try to synchronize a large volume of data then there
you will find RDA better than Web Services as for as the data
transfer speed is concerned.

XML Web Services Pros:
1. Cross platform availability
2. Secured using SSL and HTTP Authentication

XML Web Services Cons:
1. Slow Performance (slowest of all)
2. No in-built support for synchronizing data (we will have to
implement)
3. Data transfers as XML so not as efficient as binary formats used
by RDA or Merge Replication
4. SQL Server CE takes up memory if stored in CE tables

SQL Server CE RDA Pros:
1. Simple to setup
2. Rich functionality provided by SQL Server CE

SQL Server CE RDA Cons:
1. SQL Server CE takes up memory
2. No merging functionality built-in (we will have to implement it)
You can choose from these and get the data to SQL CE and your
application will work stand alone.

If your desktop database is not SQL Server, you may choose XML Web
Services as the sync option.

If you are not going to use any database and you can simply sync XML
file or CSV file using Active Sync.
Any code snippets or pointers will be of great help. Or atleast I should
have a mechanism to get the data from the SDF file(on the device) in XML
format, to the desktop application.

There are some third party tools to read sdf files in desktop few links
are here

http://www.primeworks.pt/site/en/SqlCeConsole.htm

http://www.gui-innovations.com/html/remotesqlce.html

These Links will always help you in Compact Framework development, You
can find tons of articles here in these links.

http://www.opennetcf.org

http://samples.gotdotnet.com/quickstart/CompactFramework/

http://www.codeproject.com/net­­cf/

http://www.dotnetcf.com/

http://www.devbuzz.com/

http://www.businessanyplace.ne­­­t/

http://smartdevices.microsoftd­­­ev.com/

Hope this helps,
Cheers,
Arun.
Innasite.com
 

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