sqlite-net

UWP sqlite-net Async database access

左心房为你撑大大i 提交于 2019-12-25 03:13:12
问题 On my UWP app, I'm using sqlite-net to access the database. According to their GitHub Page I'm using Source Installation. Now I want to migrate to using the Nuget package (To get the latest updates) and they have mentioned getting the PCL package. When I add the PCL package I don't have Async operations available like it was on Source Installation. Please let me know how to proceed on this matter. When it comes to UWP and I want to use sqlite-net I see soo many nugets in VS 2015 Nuget Package

Getting exception when using SqliteNet

帅比萌擦擦* 提交于 2019-12-25 02:29:02
问题 I keep getting an error when attempting to do anything with sqliteNET. I get exception: near ")": syntax error at SQLite.SQLite3.Prepare2 (IntPtr db, System.String query) [0x00029] in /Users/ultradev/Projects/URM Mobile/UltraRoute/Database/SQLite.cs:3025 at SQLite.SQLiteCommand.Prepare () [0x00012] in /Users/ultradev/Projects/URM Mobile/UltraRoute/Database/SQLite.cs:2190 at SQLite.SQLiteCommand.ExecuteNonQuery () [0x00026] in /Users/ultradev/Projects/URM Mobile/UltraRoute/Database/SQLite.cs

sqlite-net like statement crashes

橙三吉。 提交于 2019-12-24 02:56:11
问题 I have a SQL statement like this: Global.db.Query<Cards>("select * from Cards where card_name like ?", nameTextBox.Text); But I want to add % to both sides like this with the parameter value. Global.db.Query<Cards>("select * from Cards where card_name like %?%", nameTextBox.Text); But I'm throwing an error when I try to execute this. Any ideas why its crashing when I use the like statement like this? I ran the same query in my sqlite admin program with the same database and the results came

How to use(create db, create table, query, etc) praeclarum sqlite-net?

泄露秘密 提交于 2019-12-23 13:03:18
问题 I want to use sqlite-net available from this link https://github.com/praeclarum/sqlite-net. Unfortunately, the getting started documentation are not enough. It doesnt even mention how to create a database. I tried looking at the examples, unfortunately, the examples are broken(unable to compile, run time error etc). The most practical tutorial i can find on the net is http://blog.tigrangasparian.com/2012/02/09/getting-started-with-sqlite-in-c-part-one/ Unfortunately, sqlite-net doesnt fully

Xamarin set password to SQLite database

試著忘記壹切 提交于 2019-12-20 05:13:46
问题 The conn.setPassword and conn.open have error, can SQLite.NET set the password to the sqlite database? private void Btnsign_Click(object sender, EventArgs e) { try { SQLiteConnection conn = new SQLiteConnection("Data Source=user.db3;Version=3;"); conn.SetPassword("password"); conn.open(); var data = conn.Table<login>(); var data1 = data.Where(x => x.username == txtusername.Text && x.password == txtPassword.Text).FirstOrDefault(); if (data1 != null) { Toast.MakeText(this, "Login Success",

Xamarin set password to SQLite database

你。 提交于 2019-12-20 05:13:14
问题 The conn.setPassword and conn.open have error, can SQLite.NET set the password to the sqlite database? private void Btnsign_Click(object sender, EventArgs e) { try { SQLiteConnection conn = new SQLiteConnection("Data Source=user.db3;Version=3;"); conn.SetPassword("password"); conn.open(); var data = conn.Table<login>(); var data1 = data.Where(x => x.username == txtusername.Text && x.password == txtPassword.Text).FirstOrDefault(); if (data1 != null) { Toast.MakeText(this, "Login Success",

Query multiple tables SQLite Windows 10 UWP

坚强是说给别人听的谎言 提交于 2019-12-13 16:38:32
问题 I am developing a Windows 10 UWP app with a SQLite database. I need to retrieve data from multiple tables. I already have the following code to get data from a single table, but a custom object with the exact same amount and names of the columns of the table in question is needed. public ObservableCollection<Employee> GetEmployees() { using (var dbConn = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH)) { List<Employee> myCollection = dbConn.Table

multiple update statements throw “cannot open”

夙愿已清 提交于 2019-12-12 18:26:56
问题 I am getting a "cannot open" exception when I try to do multiple updates on the same table in the same transaction on SQLite in WinRT. I have created a sample application for this use case. Below is code where on clicking the first button, I am creating a table in a transaction, and on clicking the other button, I am trying to update the same record a second time. There, it throws a "cannot open" exception. app code: private SQLiteConnection getConnection() { var connection =

SQLite.Net PCL support / workaround for Windows Phone 8.1

时光总嘲笑我的痴心妄想 提交于 2019-12-12 14:44:12
问题 I have a WIndows Phone 8.1 application and I want to use the SQLite.Net PCL library forked oysteinkrog here: https://github.com/oysteinkrog/SQLite.Net-PCL However, when I'm trying to create a new connection I do not have all properties needed to create a SQLiteConnectionWithLock I have found this: var conn = new SQLiteAsyncConnection(new Func<SQLiteConnectionWithLock>(()=>new SQLiteConnectionWithLock(new SQLitePlatformWinRT(), new SQLiteConnectionString(databasePath, storeDateTimeAsTicks:

upgrading SQLite-net to SQLite.net - create SQLiteConnection

只愿长相守 提交于 2019-12-12 08:46:48
问题 I used to open my SQLiteConnection in my shared project as following: var conn = new SQLiteConnection("MyDb.db3"); The constructor has been changed to the following signature: public SQLiteConnection(ISQLitePlatform sqlitePlatform, string databasePath, bool storeDateTimeAsTicks = true, IBlobSerializer serializer = null, IDictionary<string, TableMapping> tableMappings = null, IDictionary<Type, string> extraTypeMappings = null, IContractResolver resolver = null); public SQLiteConnection