General DB Solution?

  • Thread starter Thread starter Rod O.
  • Start date Start date
R

Rod O.

Hey all,

I am writing a large application that includes both a WinCE and a PC
component. It's a pretty stock situation:

o a user will take an iPAQ into the field and collect data
o when the user returns to the office, they will sync with our PC app

My problem is that I need a general database solution on the PC side; we
expect that most purchases will be by companies that already run a
database and that database may not be SQL Server.

So... without writing my own, custom DB, what would you recommend as a
CE-side solution for managing data? I need to be able to 'UPDATE',
'INSERT', and 'DELETE'... ideally using SQL as the mechanism but not
necessarily.

Thanks in advance,

Rod O.
 
what about DataSet ?
they couls be saved and read and used as in-memory database ..
 
Hi Rod,

I can talk about that for hours. ;-) But could you clearify your
problem? At the moment I don't know if you have a problem with the
synchronisation itself, so you search for a special product. Or you want
to share code between the two applications because you have similar
database access. Or both? I try to write some kind of article about that
in the future, but ... no time at the moment.
Just a short answer.
For the first problem: SqlCe with Sql is not enough, I agree. Take a
look at products like MobiLink from Sybase. That's better, but you are
limited to Sybase DB on CF and to other DB's that Sybase supports. Best
way but a lot of work is to write your own Webservice. You can have on
your iPaq whatever you want, you can do some logic in the webservice and
the webservice can be written to talk to any DB you like at server (see
also next part).
For the second problem: Use the interfaces (Db..., etc.) in combination
with a factory. Especially take a look at the Mono project, Provider
Factory. This works great at server side. At CF I try to get deeper, but
there is more to do (problems with config, etc.).
Hope this helps,
Christoph
 
I agree with Cristoph as this is an approach I am taking - my host
database is currently access but I am using SQL CE on the device.

My predecessors on this project used TCPIP and RAPI to push DataSets
between the server and client however I wish to move to WebServices
and then I can replace the desktop come with webservices running on
IIS (or if that is too expensize then I might try the Cassini web
server). The databse may turn into SQL and then I may be able to use
synchronisation etc later but this way allows me to hide the database
on the desktop side

Shaun
 
Hi Cristoph, Shaun,

Thanks for your feedback! You've definitely pointed me in the right
direction. For the record, let me try to restate my problem space and
then I'll tell you what I'm going to build.

1. My application will be written in C#.

2. Users of my app will be collecting data in the field. I need a
database that I can access using ADO.NET on the Compact Framework.

3. Each field-based iPAQ will be synchronized with a shared PC-based
database. The make of this database (SQL Server, Oracle, Postgres,
mySQL, etc) is not under our control.

My major issue is the synchronisation.

Web services sounds fine but... I can't impose the additional
requirement of a web server (neither cost of purchase nor cost of
training) on the client. But you've definitely pointed me in the right
direction! I'll build some SOAP services and handle the marshalling
within my app... no web server required!

As for a factory for dynamic database connectivity... what the hey was
MS thinking when they didn't design that in the first place???
Nonetheless, it is relatively trivial to build one and that is what I
will do. The required 'driver' (i.e. namespace) will be specified within
an INI file and a factory will provide the rest. I will have a look at
the Mono implementation though...

Cheers and thanks again,

Rod O.
 
Back
Top