I am writing a custom PRAGMA in my SQL db file using the code below:
using (var db = GetNewConnection()) { var version = "1234"; var query = string.Format("PRAGMA user_version={0}", version); db.ExecuteSql(query); }
Which successfully writes PRAGMA to a file, and I can verify that using SQLite Expert or LINQPad it does:
PRAGMA user_version
But how can I read the PRAGMA value from a DB file using OrmLite v3.9.71?
I tried the following, but it couldnโt parse SQL because it could not find "FROM":
db.Select<object>("PRAGMA user_version");
I also tried the following: none of them work:
db.Select<dynamic>("PRAGMA user_version"); db.Select<string>("PRAGMA user_version"); db.Select<int>("PRAGMA user_version");
Any ideas?
MaYaN source share