我可以同时从多个应用程序访问同一个 SQL 紧凑数据库 (sdf)

发布于 2024-10-01 04:43:07 字数 218 浏览 0 评论 0原文

我有一个现有的应用程序,它使用 SQL Compact Mobile 3.5 和 SQL 合并复制来使用 HTTP 与完整的 SQL 数据库同步。

我可以在同一设备上同时使用同一数据库(同一 sdf 文件)运行另一个应用程序(exe)吗?我知道 SQL Compact Mobile 是在进程中托管的,但这仍然可能吗?

如果是这样,我应该如何处理同步(我假设我无法同时从两个应用程序同步)。

I have an existing application that uses SQL Compact Mobile 3.5 and SQL Merge replication to sync with a full SQL database using HTTP.

Can I run another application (exe) on the same device that uses the same db (same sdf file) at the same time. I understand that SQL Compact Mobile is hosted in process, but could it still be possible?

If so how should I handle synchronisation (I assume I can't sync from both apps at the same time).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剩余の解释 2024-10-08 04:43:07

是的,SQL Compact 数据库可以同时由单独的进程使用 - 即它支持多个并发本地连接(请参阅 “功能列表”此处(如果您想要事实的官方声明)。数据库将为您处理锁定。

现在,当您处于同步过程中时,根据复制使用的锁定方案,不执行同步的进程很可能除了锁定超时之外什么也得不到。

Yes, a SQL Compact Database can be used by separate processes simultaneously - i.e. it supports multiple concurrent local connections( see the last bullt in the "features list" here if you want an official statement of the fact). The database will handle locking for you.

Now when you're in the middle of a sync, depending on the lock scheme replication uses, it's quite likely that the process not doing the sync is going to get nothing but lock timeouts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文