1

I asked a similar question yesterday, but I still couldn't solve my problem. I am sharing the problem as a photo. How can I solve this?enter image description here

I also use this function with button. enter image description here

1 Answer 1

1

I'd say it's because your strings aren't enclosed in ' or ": it's always better to wrap them to avoid errors. Try changing the query into [...] VALUES ("erol", "bascifci", "[email protected]", "testtesttest")

Sign up to request clarification or add additional context in comments.

6 Comments

Sorry i'm new to this. Can you explain with an example to be clear?
The line 47 of the code you posted should look like this: '"${json[UserTitle.name]}", "${json[UserTitle.surname]}", "${json[UserTitle.email]}", "${json[UserTitle.password]}"'; It is quite hard to read, but I simply wrapped each ${...} between ". In this way, each field will be included in quotes, and SQL will know that they are Strings and not part of the query
thanks. but ı got a another error. SqfliteDatabaseException (DatabaseException(no such table: table_name (Sqlite code 1 SQLITE_ERROR): , while compiling: INSERT INTO table_name (name, surname, email, password) VALUES ('testname', 'testsurname', '[email protected]', 'test123'), (OS error - 2:No such file or directory)) sql 'INSERT INTO table_name (name, surname, email, password) VALUES ('testname', 'testsurname', '[email protected]', 'test123')' args [])
That means that table_name is a table that doesn't exist. You need to put in line 49 the real name of your users table.
thanks dude. I fix this. Delete app and restart debugging and its work. thanks again.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.