Hi! Could you share the error messages you’re getting on Android? It also looks like you’re not using the ? placeholders in your queries, so you could try fixing that.
Thanks for sharing some code, but a minimal repro would be really helpful!
Hi,
thanks for the help!
I uploaded the whole git repository to this snack. mplus - Snack
the sqlite queries are in /helpers/db.tsx
Thanks a lot!!!
Will post the error messages a little later.
Hi,
me again. Sorry, I couldn’t update the first post.
I tested it again with iOS simulator and everything works fine.
On android emulator I get the following errors:
If I try to add a class, the class is added in the db but I get the following error.
the bind value at index 1 is null
- node_modules/expo-sqlite/build/SQLite.js:36:15 in _deserializeResultSet
* [native code]:null in map
If I try to insert a student the following error appears:
no such column: studentId (code 1 SQLITE_ERROR): , while compiling: INSERT INTO student (studentId, firstName, lastName, classId) VALUES (studentId, firstName, lastName, classId)
If I try to delete a class I get the following error:
Cannot bind argument at index 1 because the index is out of range. The statement has 0 parameters.
- node_modules/expo-sqlite/build/SQLite.js:36:15 in _deserializeResultSet
* [native code]:null in map