I am using Sqlite3 and added referene to my windows store app and trying to create a database as shown below:
C:\Sqlite3>Sqlite3 mydata.db
Next trying to a create table from my codebehind as shown:
Try
Dim dbpath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "mydata.db")
Using db = New SQLite.SQLiteConnection(dbpath)
' Create the tables if they don't exist
db.CreateTable(Of person)()
db.Commit()
db.Dispose()
db.Close()
End Using
Dim line = New MessageDialog("Table Created")
Await line.ShowAsync()
Catch
End Try
Now it dosen't create any table and get's an exception as shown below
Can anyone say me where am I going wrong?
From: What causes System.BadImageFormatException when constructing System.Data.SQLite.SQLiteConnection
SqlLite contains unmanaged code, you can't run it on a 64-bit operating system unless you deploy the 64-bit version. Quick fix: Project + Properties, Build tab, Platform Target = x86.