Closed simeoncode closed 6 years ago
I am getting the same issue with SqLite SaveAsync while I can update rows I cannot create new ones.
Using AsyncPoco 2.0.0
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'near "OUTPUT": syntax error'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteScalar()
at System.Data.Common.DbCommand.ExecuteScalarAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at AsyncPoco.Database.ExecuteScalarHelperAsync(DbCommand cmd)
at AsyncPoco.Database.InsertAsync(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
at [removed]cs:line 43
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.
It is caused by wrong detection of Microsoft.Data.SQLite. I fixed it in PR https://github.com/tmenier/AsyncPoco/pull/50
Thank you for identifying the error I was about to switch to NPoco so you have saved me so much time as I do not have the dependancies for AsyncPoco on my work Mac :( . I Proposed changing to case insensitive comparisons to prevent any future issues as well.
Thanks for identifying the issue and sorry for the delay. #50 didn't go quite far enough and #51 went a little too far and broke some tests. I pushed a compromise, hopefully 3rd time's a charm. :)
This is in 2.0.1, which is now released to NuGet.
Thank you for such a quick release. My fix was conservative. Yours is much better. Thanks!
Hello, I've been struggling with an issue for a while and can't seem to move forward. Querying items in the database works fine, and so does ExecuteAsync for truncating a table. But when I reach InsertAsync or SaveAsync I get the error
SQLite Error 1: 'near "OUTPUT": syntax error
. I'm using .NET Core 2.1.0 on a Mac, with a SQLite database file. AsyncPoco version is 2.0.0 and the EF dependencies are 2.1.0.I've created a repository which reproduces the error: https://github.com/storafrid/AsyncPoco-InsertAsync-issue (start debugging locally and visit e.g. /Home/CreateCat/Miranda). In the repo I also added an example for Entity Framework Core which successfully creates cats.
Here is the stack trace: