开发在线和离线应用程序 [英] Developing an online and offline Application

查看:76
本文介绍了开发在线和离线应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我解决以下问题:为我提供Apllication的代码可以在离线模式下工作。当联机在线连接到服务器时,将其数据连接到服务器。我使用的是visual basic 10.0 windows窗体应用程序和mysql数据库

Pls help me in Following issues:provide me code for Apllication can be worked in offline mode.till connect online.save its data to server when its connect online to server.I am using visual basic 10.0 windows form application and mysql database

can work online and auto-save its database and all actions on server.

can work offline and save its database on pc .. till it connect online ..auto-save work then to save database and all actions on server.

推荐答案

您可能希望在离线时看到您在在线会话期间输入的数据,我建议采用以下方法:

1)确定离线时您可能需要远程数据库的哪个子集

2)将一个本地数据库添加到您的应用程序中;例如,它可以是一个其他实现而不是mysql(谷歌为他们,有很多)

3)使您的应用程序直接在本地数据库工作

4)创建一个基于分布式事务的同步任务/服务,它将在线时经常同步,并具有尽可能重新建立连接的逻辑
As you will probably want to see the data you entered during online session also when you are offline, I suggest the following approach:
1) determine what subset of the remote database you could need when offline
2) add a local database to your application; an embedded one for example, it can be also an other implementation than mysql (google for them, there are many)
3) make your application to work directly in the local database
4) make a distributed transaction based synchronization task/service that will do sync often when online and has the logic to reestablish connection as possible


这篇关于开发在线和离线应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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