当远程 SQL Server 不可用时存储在本地数据库中,然后在连接时同步 [英] Store in local database when remote SQL Server unavailable and then sync when connected

查看:24
本文介绍了当远程 SQL Server 不可用时存储在本地数据库中,然后在连接时同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发用于事件管理的 C# Windows 窗体应用程序.将有 15 个带有 RFID 阅读器的大门.这些读者将读取 UID 并查询数据库以检查它是否是当天唯一的条目.

I am developing a C# Windows Forms app for event management. There will be 15 gates with RFID readers. These readers will read the UID and query the database to check if it is unique entry for that day.

现在,如果由于某种原因,SQL Server 不可用,我希望应用程序将数据存储在本地数据库中,并在连接恢复后立即同步.

Now if for some reason, SQL Server is not available, I want the app to store the data in a local database and sync as soon as the connectivity is restored.

知道我该怎么做吗?

谢谢

推荐答案

您可以使用 SQL Server 复制,并在每个设备上安装带有本地数据库副本的 SQL Server Express.

You could use SQL Server replication, and install SQL Server Express with a local copy of the database on each device.

这篇关于当远程 SQL Server 不可用时存储在本地数据库中,然后在连接时同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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