WinMobile Appointments database

G

Guest

I would like to create a program (C#)or what ever I need to sync records from
a database on the PC to WinMobile Device. I have been reading and reading
and don't know what is best for this. Active Sync or RAPI or SQL Server/SQL
MobileServer? I just want to sync with a USB cable.
I need to be able to copy records from a Paradox table (on PC) that holds
Appointment data to the Windows Mobile Appointments database, and check for
modified records etc... I did this for the Palm OS and was hoping to do the
same for the WinMobile Devices. I will obviously need to convert the data
from one DB to the other. Can anyone tell me where to start? I would greatly
appreciate some sample apps, or any help.

Thanks Jon Stroh
 
S

Simon Hart

First of all you need to decide where the sync process is going to be driven
from, PC or device.

If driven from the device, you need to be clear on the type of machine that
will host the paradox database. Is it a server machine, ie does it have a
web server?

Once you have decided those above you need to make clear whether youhave
control over the structure of the devices database and the PC paradox
database.

On top of that, the connectivity, would this always be USB or might there be
a requirement to sync out in the field.

The ways of doing sync code is endless you see and it all depends on the
requirements.
 
G

Guest

Thanks for all that great information. I have already started a C# compact
framework application in MSVS 2005. The Appointments sync is only the
begining of the process the rest of the application would also sync the
Client data and Invoice data, and Horse data from a Delphi written program as
well. So I would like to drive the sync from the Device. Windows Mobile 5.
If driven from the device, you need to be clear on the type of machine that
will host the paradox database. Is it a server machine, ie does it have a
web server? No webserver it would only be syncronized via a usb cable. I need to make the sync as simple for my end users as possible, I must also do all set up with code for them when the app is installed so all the have to do is tap the sync button in the device app.
Once you have decided those above you need to make clear whether youhave
control over the structure of the devices database and the PC paradox
database.
I have already created the device db's and all fields in every table match
for data types as far as I can tell at this point.
On top of that, the connectivity, would this always be USB or might there be
a requirement to sync out in the field.

It would be nice to be able do a sync in the field but I think it may be to
dificult for my end users to set up and use, unless I can make it simple for
them.


I hope that will help explain my situation a little better. Which sync
method do you think would be the best for the usb sync and which would be
easiest for me to implement, knowing that I come from Delphi (Object Pascal)
and being new to C#?

Thanks Jon Stroh
 
G

Guest

I hope this is not a double post, sorry if it is.

Thanks for your reply Simon
First of all you need to decide where the sync process is going to be driven
from, PC or device.
I would like to drive it from the device. I have already started a C#
compact framework Database app. I woud like to just place a sync button on
the main page of that application. After I learn how to sync the appointments
db, I will need to syncronize the rest of the databases on the device with
Paradox tables on the PC as well.(Clients,Invoices,LineItems,HorseInfo)
If driven from the device, you need to be clear on the type of machine that
will host the paradox database. Is it a server machine, ie does it have a
web server?

No webserver, just Win XP Home and Win XP Pro machines.
Once you have decided those above you need to make clear whether youhave
control over the structure of the devices database and the PC paradox
database.
The PC databases are from my Delphi(object Pascal) database application, I
have control over them but the structure should stay as close to the same as
possible because they sync with the Palm databases also. But I can alter the
PC data if needed. The Device Databases can also be altered if needed.
On top of that, the connectivity, would this always be USB or might there be
a requirement to sync out in the field.

Always USB for sync because my end users will not have the need for a field
sync at this time.

I hope that will help define my situation a little better. Any suggestions
about weather to use Active Sync or RAPI or SQL Server/SQL MobileServer would
be appreciated.. I just want to start this headed in the right direction.


Thanks Jon Stroh
 
S

Simon Hart

Thanks for all that great information. I have already started a C# compact
framework application in MSVS 2005. The Appointments sync is only the
begining of the process the rest of the application would also sync the
Client data and Invoice data, and Horse data from a Delphi written program
as
well. So I would like to drive the sync from the Device. Windows Mobile 5.

You need some kind of server process running/listening for requests from
your device.

You have the following options:

1. Raw sockets
2. COM+

If you don't want to use a web server then you can using raw sockets but
this requires a little bit more development work as its much lower level
than say using a Web Service. I believe it is possible now to call a remote
COM+ object from devices under CF2. Maybe someone else can chip in here as
without looking it up I'm not entirely 100%. Of course the limitation with
this is it would be almost impossible to sync out in the field.

There are pro's and cons with each of the above.
I have already created the device db's and all fields in every table match
for data types as far as I can tell at this point.

The matching of data is not that important. Often you have a cut down
version running on the device. The important thing is you need to know
whether a particular record has changed or not. How I do this is have a
tinyint field which contains certain values depending on the status of the
record.
It would be nice to be able do a sync in the field but I think it may be
to
dificult for my end users to set up and use, unless I can make it simple
for
them.

Not really. If you have a web service running on the PC, the end user would
not have to configure anything if you route those messages through COM for
example. As Paradox doesn't have built in security - in other words its not
a server, you have to routes messages from an anonymous account to a trusted
one that has permissions to write to disk. To minimize configuration and to
reduce security vunerablities, routing messages via COM is a good choice
IMHO.

As everyone knows the bad old days of DCOM across domains is a nightmare to
use and something that is not desireable or really usable via the internet.
This is where using a web server is the key.
I hope that will help explain my situation a little better. Which sync
method do you think would be the best for the usb sync and which would be
easiest for me to implement, knowing that I come from Delphi (Object
Pascal)
and being new to C#?

If possible the COM server via the device (if possible via CF2) would be the
easiest but has of course limitations.
 
S

SammyBar

I hope that will help define my situation a little better. Any
suggestions
about weather to use Active Sync or RAPI or SQL Server/SQL MobileServer
would
be appreciated.. I just want to start this headed in the right direction.
I developed a disconnected app for sales people. It has a SQLServer CE that
must be in sync with the SQLServer 2000 corporate database both. The
inexpert obvious choice is to use SQL replication: it is relatively easy to
set up and works very well... But I've been repenting for years of this
decision. It is also so inflexible, and so dumb... If you know your data
structure you can make a better data replication solution by using RAPI. It
will be wiser, faster, and will not have problem to change the underlaying
tables structure. Just plan your tables ahead for replication by including
the proper indexes and go for yourself. You will be able to implement
replication schemas more sophisticated and more real work than the three
available on SQL 2000.

It is a very insightful article on MSDN site about when to use SQL out of
the box replication mechanism and when to use a custom solution. The
subjective conclusion is go with replication for quick and dirty work, but
for any serious, go with a custom solution. I found this article too late. I
don't remember the link for the article but it should appear fast if
googling with the proper keywords.

Good luck
Sammy
 

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