Hi
Any Insert command into SQLite database generate a run time error:
SQL logic error unrecognized token: @
If I use a MySQL database the insert command run successfully
Code example:
string SQLiteDatabase = @"C:\Temp\FileEspresso.db";
SQLiteConnection sqliteConn = new SQLiteConnection("Data Source=" + SQLiteDatabase + ";Version=3");
sqliteConn.Open();
db = new NPoco.Database(sqliteConn, DatabaseType.MySQL);
Category cat = new Category(0, 1, "XXXXX TEST-1- XXXXX");
db.Insert(cat); // <-- Run time error here!!!
db.CloseSharedConnection();
NPocoTest.zip
Attached here a sample application (copy SQLite sample database file FileEspresso.db into folder C:\Temp)
Hi Any Insert command into SQLite database generate a run time error: SQL logic error unrecognized token: @ If I use a MySQL database the insert command run successfully
Code example: string SQLiteDatabase = @"C:\Temp\FileEspresso.db"; SQLiteConnection sqliteConn = new SQLiteConnection("Data Source=" + SQLiteDatabase + ";Version=3"); sqliteConn.Open(); db = new NPoco.Database(sqliteConn, DatabaseType.MySQL); Category cat = new Category(0, 1, "XXXXX TEST-1- XXXXX"); db.Insert(cat); // <-- Run time error here!!! db.CloseSharedConnection();
NPocoTest.zip Attached here a sample application (copy SQLite sample database file FileEspresso.db into folder C:\Temp)
Many thanks and best regards