简体   繁体   English

集中sqlite数据库WPF c#应用

[英]Centralized sqlite database for WPF c# application

I'm trying to have a single sqlite database file which can be accessed by multiple users.我正在尝试拥有一个可以被多个用户访问的 sqlite 数据库文件。 I want to store this sqlite file on a NAS which is accessible for all the users on the.network.我想将这个 sqlite 文件存储在网络上所有用户都可以访问的 NAS 上。 How do I pass the connection string in the SQLiteConnection() class?如何在SQLiteConnection() class 中传递连接字符串? I've tried other methods too, but nothing gives.我也尝试过其他方法,但没有任何效果。

This is my connection string这是我的连接字符串

SQLiteConnection conn = new SQLiteConnection(@"DataSource=\\192.168.1.51/Databse/Inventory.sqlite;Version=3;",true);

That's the IP address of the NAS那就是NAS的IP地址

Thanks谢谢

Using SQLite on.network file system or device isn't a recommended use case.不推荐使用 SQLite on.network 文件系统或设备。 You may want to find this documentation page interesting https://www.sqlite.org/useove.net.html您可能想找到这个有趣的文档页面https://www.sqlite.org/useove.net.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM