开发者

Windows Mobile: access desktop database from mobile mobile and synchronization

I have a desktop application that handles products, customers and orders for a restaurant. Waiters us开发者_开发技巧e mobile phones (with Windows Mobile 6.5 OS) to take orders. What I need is:

  • SQLCE Database in the mobile phone with customers, products and tables. Mobile phone would only query this data.
  • Mobile phones take new orders or modifies existing orders so I need to send this data to the desktop database and get opened tables from desktop database.

Questions:

  • Do I need a SQLCE database in every mobile phone or it would be better to access desktop database directly?
  • How can I synchronize mobile database with desktop database?

I'm using a Microsoft Access DB in desktop application but I think it would be better to migrate to SQLCE database because of synchronization. I'm not going to use SQL Server Database due to deployment requirements.

I hope it's clear enough and thanks in advance.


Do I need a SQLCE database in every mobile phone or it would be better to access desktop database directly?

I'm my experience it will depend on the signal / service coverage in the working area. I prefer to have the sqlce db installed on every device. So the access it's faster as you have a cached copy of data commonly used on the device (Products / Tables).

How can I synchronize mobile database with desktop database?

There are different methods that can do the trick

  • SyncFramework
    • Haven't tested it yet
  • Custom Webservices
    • I use one Catalog Sync Webservice and one Business Webservice
  • Desktop Craddle
    • You can use Smart Device Framework RAPI Class, to copy the database and via another program perform the sync to the database.


I've build a system with similar requirements. I'm using SQL CE on the Windows Mobile devices. I spent a lot of time mucking around with the Sync Framework but I found it very complicated and for some reason it ran extremely slowly. I only needed a pretty simple one-way sync from server to mobile with only minor data flowing back the other way so I ended up writing my own using a WCF service. This was quite a bit of work so you are right to test some other options first. I really don't like systems with multiple databases and syncing - I've seen so many problems with these systems in the past. To be avoided if at all possible!

By the way, it's true what they say about data tables and data adapters. Don't use them on a mobile - they are very slow. I changed over to simple business objects (POCO) and got a huge performance boost.

Cheers
Mark

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜