問題描述
C# 移動設備應用程序中的 SQL 複製 (SQL Replication in C# mobile device application)
I have a mobile application (CE) running on a Motorola Symbol 3090 which should allow for scanning of inventory items and changing their properties on our SQL server (The table has existed on the server for years and now they want a way to use mobile devices to update).
Here is the problem I am facing which needs addressing.
- Our warehouse is very large and spans over multiple locations so inevitably we have dead zones in the warehouse so having a constant connection is not possible. What I have proposed is a way to go in offline mode and have an up to date copy of our inventory on local device. This would allow all transactions to be found and recorded locally. When the device is returned to cradle or back to wifi it updates the database. With this proposal i'm not sure if SQL Replication is the best way to handle this type of application.
Was hoping some more experienced mobile device developers had any input into the design scheme.
I have only been developing on these types of systems (Motorola symbol 3090) for about 2 months now and have no background knowledge in SQL Replication. I understand the basics of what replication is doing but that is about the extent of my knowledge on the subject.
‑‑‑‑‑
參考解法
方法 1:
As ErikEJ points out in the comment above, Merge Replication would work well for this scenario. Here are some resources to get you started:
- MSDN's 'explanation'
- Rob Tiffany's Book
- Chris Fairbairn's blog
- Erik's Library