Throw no error when execute complicated sql query
linhttbk97 opened this issue · 4 comments
I have query that create and insert data like this
When I called db.executeAsync(query) -> I got an error : [Error: [op-sqlite] SQL execution error: not an error]
I don't know it actually is but all tables and data were created successfully
There is an error somewhere on your query. This is what the debugger is showing:
The returned code is SQLITE_MISSUSE = 21
#define SQLITE_MISUSE 21 /* Library used incorrectly */
Meaning you are doing something wrong. The query that is throwing the error is the first insertion, but I don't know which one of the insertions is failing.
I don't think it is a problem with the library but with your SQL query. This answer seems to suggest you are using another SQL syntax not supported by sqlite
https://stackoverflow.com/questions/1609637/how-to-insert-multiple-rows-in-sqlite
But I just pasted it on Database Browser For Sqlite and run that query. It worked normally @ospfranco btw many thanks
I released a new version that also prints the error code, so you can debug for yourself. Try running the commands one by one and see what is happening, but as stated I don't think the library is doing anything wrong, but rather a SQL syntax error.
Yeah, I'm using sqlite 3.42. I could be string escaped problem. Thanks