Saving Relation Data on Pocket PC

A

andreasviklund

Hi!

I am working on a Pocket PC application where I am supposed to store
data from a server on to the device. The data is collected via
ActiveSync in a xml-file and consists of between 5-10 relation tables,
requested from a SQL Server DB.

The idea is that the user collects data from the server when he is
online, and then goes offline to work with a customer or outside the
office. He/she should then be able to read, create and modify the
data/tables on the device. And when the user gets back to the office he
goes online and syncs the data using ActiveSync.

My question is, what is the best way to store this type of data on a
Pocket PC device? Any suggestions? I could not use SQLCE, which
otherwise would be a simple solution. I was thinking of using DataSets
and XML-files but I am not sure if that is a good solution, and fast,
when I am working with several relation tables. The xml-file would then
be collected from ActiceSync, and when the PocketPC-application starts
the data in the XML-file is loaded into a DataSet, and the user could
then modify the data there, and when done, the dataset is saved back to
the XML-file.

Any other suggestions on how to solve this problem?

Best Regards
Andreas Viklund
 
A

andreasviklund

We are working on two different solutions in two teams. one team is
developing a Pocket PC application using sqlCE. Mine is trying to find
an alternative solution...
 
P

Peter Morris [Droopy eyes software]

I could not use SQLCE

Why not?
I was thinking of using DataSets and XML-files

You wont get much data that way, you will run out pretty quickly. Can you
use another DB such as SQLite (binary compatible on PPC and Desktop)?

Pete
 
A

andreasviklund

You wont get much data that way, you will run out pretty quickly.

What do you mean by that? In a dataset it is possible to save several
tables, is it not possbile to save them down into the same xml-file?

The problem with this solution is that we are getting a xml-file from
activesync. It is not possible to communicate directly with the SQL
Server DB in this case. on the server the xml-file is collected by
Biztalk, and then biztalk updates the DB.
 
P

Peter Morris [Droopy eyes software]

I have an app that updates a SQLite database. If I used XML then I would
quickly run out of memory because

1) XML is so verbose
2) The XML would all be loaded into memory at once


Instead I opt to

1) Import XML to SQLite (stored on secondary flash card)
2) Work on data (on secondary flash card) fetching only the data I am
currently working on into RAM
3) Export XML to secondary flash card
 
A

andreasviklund

thanks for your responses Peter. They have been very helpful.

Is SQLite database compatible with .Net Compact Framework 2.0?
 
P

Peter Morris [Droopy eyes software]

Is SQLite database compatible with .Net Compact Framework 2.0?

Yes, that is what I am using. It is also possible to create the database in
a desktop app and then put that onto the PPC as the files are binary
compatible. So you may skip the XML if that helps.

Pete
 
A

andreasviklund

I have been working with SQLite in a Mobile 5.0 project using Visual
Studio 2005 and it is great. I am able to view and update data in a
sqlite database on my PDA-device.

But I am not sure how to load data from an XML-file into the DB and the
other way around. The data in the xml-file should have the same
fields/columns as the tables in the database.

Can you help me with some source code?
 

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