离线时在本地存储数据的最佳方法 [英] Best means to store data locally when offline

查看:316
本文介绍了离线时在本地存储数据的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个小程序(比起其他任何东西,vs 2010的试验更多)

I am in the midst of writing a small program (more to experiment with vs 2010 than anything else)

尽管是实验,但它在我们当地的体育俱乐部中有一定的实际用途.

Despite being an experiment it has some practical use for our local athletics club.

我的想法是访问数据库(当前在线)以下载当前成员并本地存储在便携式计算机上(这是MS sql表,用于为俱乐部的网站提供动力).

My thought was to access the DB (currently online) to download the current members and store locally on a laptop (this is a MS sql table, used to power the club's website).

将笔记本电脑带到活动中(是的,有一些地方没有互联网覆盖),添加当天比赛的成员(也是sql表中的一行(尽管对此不会做任何更改),记录结果(第3个表中的新记录)

Take the laptop to the event (yes there ARE places that don't have internet coverage), add members to that days race (also a row from a sql table (though no changes would be made to this), record results (new records in 3rd table)

回到家后,冲凉并再次进入互联网,根据比赛结果/成员变更等信息上载/编辑表格.

Once home, showered and within internet access again, upload/edit the tables as per the race results/member changes etc.

所以我当时想做一些事情,比如用数据在本地编写xml文件,包括一个指示更改的字段等?

So I was thinking I'd do something like write xml files locally with the data, including a field to indicate changes etc?

如果有人能指出我的方向,我将不胜感激……如果有人能告诉我它的名字,我将不胜感激.

If anyone can point me in a direction I would appreciate it...hell if anyone could tell me if this has a name, I'd appreciate it.

推荐答案

基本上,除了远程数据存储之外,您需要的还有台式机上的本地数据存储.然后,您可以在脱机/联机时手动编写代码以同步数据存储,也可以使用 Microsoft Sync框架为您处理.

Essentially what you need is, in addition to your remote data store, a local data store on your desktop. You could then write your code by hand to sync the data stores when you go offline / online, or you could use the Microsoft Sync framework to handle it for you.

我已经在许多项目上使用了Sync框架,一旦习惯了这些约定,就非常容易使用.

I've personally used the Sync framework on a number of projects and once you get used to the conventions, it's pretty easy to use.

这篇关于离线时在本地存储数据的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆