是否可以在 PC 的共享文件夹中使用 SQLite 数据库? [英] Is it possible to use a SQLite database in a shared folder in a PC?

查看:53
本文介绍了是否可以在 PC 的共享文件夹中使用 SQLite 数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 UWP 应用程序(Windows 手机 10),并且我在局域网中的 PC 的共享文件夹中有一个 SQLite 数据库.我想知道我是否可以在 windows phone 应用程序中使用这个数据库,就像我在我的 WPF 应用程序中所做的那样,我可以设置数据库的路径,我可以在我局域网中的任何计算机上使用它.

谢谢.

解决方案

简短回答:
是的,您可以,但是您需要注意您选择的日志模式,例如 WAL 不能通过网络文件系统工作.

长答案:
如果您发现自己处于许多客户端/程序需要通过网络访问公共数据库的情况,您应该考虑使用客户端/服务器数据库或提供某种 API,以便将客户端的数据按顺序保存到 SQLite DB.

有关更多信息,请参阅SQLite 的适当使用

I am developing an UWP application (Windows phone 10) and I have a SQLite database in a shared folder in a PC in my LAN. I would like to know if I can use this database in the windows phone app, like I do with my WPF application, that I can set the path of the database and I can use it from any computer in my lan.

Thanks.

解决方案

Short answer:
Yes you can however you will need to be careful about the journaling mode you choose for example WAL does not work over a network file system.

Long answer:
If you see yourself in a situation where many clients/programs need to access a common database over a network you should consider a client/server database or provide an API of some sort that would sequentially persist the client's data to the SQLite DB.

For more info see Appropriate Uses of SQLite

这篇关于是否可以在 PC 的共享文件夹中使用 SQLite 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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