Using Pragma-s of SQLite in C#

做~自己de王妃 提交于 2020-01-13 08:34:28

问题


I had posted a question

"My Projects has c++ dll in which a db is created in Sqllite with share deny = none . This dll will insert data into Db and I have a c# exe which must access the db and display it . Display needs to be done asynchronously. So there any way while launching connection to sqlitedb i can lock the table or db. if Possible can anyone give me links or sample on how it can be done "

for this I got a reply of of using Pragma -s can any one tell me on how to implement PRagma-s of SQLlite in C#.


回答1:


Pragmas can be set in your connection string

For eg:
String conString = "Data Source=filename;Version=3;PRAGMA locking_mode = NORMAL;"

You can append more than one pragma to the connection string



来源:https://stackoverflow.com/questions/2286827/using-pragma-s-of-sqlite-in-c-sharp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!