DEV Community

Discussion on: Flutter Sqflite Error ! Please Help...

Collapse
 
tiguchi profile image
Thomas Werner

Hi Marcel. Given the info in your question it's almost impossible to figure out what's going on. It's just a truncated error output. But for troubleshooting and helping you it's also necessary to see the actual full CREATE TABLE commercant source code so it's possible to point out where the syntax error is coming from.

I'm not sure if it's just an error log output glitch, but it seems the CREATE TABLE commercant(...) code is duplicated, and right before the duplication starts there is in fact an INTEGER keyword as pointed out by the syntax error message:

...favorite INTEGER) sql ' CREATE TABLE commercant(....
Enter fullscreen mode Exit fullscreen mode

This would be in fact invalid SQL and could be a copy paste mistake in the SQL script file?
Two SQL statements, such as for creating tables, need to be separated by a semicolon. But again, without having seen the original SQL source file it's hard to guess what's going on.