You’re right, but are you sure that the data in the database that you showed in the first image, are the same as in the table? I imagine that the database you show in the first image is a database managed on a PC, how did you reproduce it on the device? Have you exported the db from pc and imported it into the device?
Hi Enzo,
That was exactly my first question I asked myself. I end up using the wrong database. So I checked this, and yes there are multiple databases in…
/storage/emulated/0/EasyInvent
my private appfolder…
/storage/emulated/0/Makeroid/assets
as expected
/storage/emulated/0/Appinventor/assets
cause I start developing with Appinventor
But in any cases thers is true == 1 in the database
Do this test: insert a new row in the db of the pc (maybe with the value a true on the field concerned), export the db, import it into the device and first check that that new row is present and then the value of the interested field. I hope I explained myself.
How did you export the database from pc to device. The one on PC doesn’t seem to be a Sqlite database, I think there was a conversion, it may be that the conversion changed that value from checked to 0 for some strange reason. If so, the problem is not in Kodular or in the Sqlite extension.
If you actually exported that db to Sqlite you can try the file produced on Sqlite manager online and see what it puts you in that field, so in the meantime you understand if it can be a problem related to Kodular or not.
My doubt is that you have two databases on the device, the one that reads the app (an old version) and the one imported afterwards. To eliminate doubts, try to write new information and reimport it and see as a companion if you see that new information
So have you tried adding new information (e.g. a new line) on the database managed by PC and imported it into the device database? If yes, do you see the new information in the device database?
Meanwhile I have deleted the db 's in the Assetsfolders now there is only the db in my Appfolder an the result is the same. @Taifun I think ist on time to give your comment to this Problem or not ?
you have to import your initial database on firstrun of the app (Import method), see again the example project how to do it https://puravidaapps.com/sqlite.php
and you have to upload the initial database in the media section of the designer, so it is available as asset in the app
SUCCESS
After many more tests I have now managed to address the right values, or rather the right database. Taifun was of course right with his tip from Q11, but unfortunately this change did not help me either and nothing has changed. Then I also had the path displayed from the standard module. And lo and behold, there was a completely different data path (see picture line 3).
From now on it was clear to me where the problem was. To prove my guess, I renamed my database and copied it into the assets and application directory. And lo and behold … the expected values were suddenly there.
reason
I had previously worked with this database using the standard tool (storage … sqlite). Then I switched to the Typhoon tool. However, the access was still carried out on the DATABASE.sqlite, it seems.
In my view, possible reasons are
Kodular has a problem with the standard search path and therefore always pulls the old standard DB.
Kodular does not remove everything when deleting in the asettes. First of all, it doesn’t seem like the temporary file.
When taking over projects from AppInventor, Kodular also takes over parts that you do not need yourself.
There are many possible sources of error …
My personal tip to avoid this problem is.
When importing a project or changing to another SQL extension, renaming the database name so that access is clear.
this is the default location of the sqlite database
it seems to be, you use the GetPath method from the built in sqlite component
it seems to be, you forgot to import the initial database as mentioned earlier…
to remove the old database from the companion app, alternatively you also could reinstall the companion app or use the Clear Database method from the built in sqlite component https://docs.kodular.io/components/storage/sqlite/#clear-database
Kodular accesses the database on the default path and you have to make sure to import your initial database
most probably you are talking about the database, which was not removed… the database is stored in folder /database and not /assets, so deleting the assets will not remove the database
to remove the old database from the companion app, you could reinstall the companion app or use the Clear Database method from the built in sqlite component https://docs.kodular.io/components/storage/sqlite/#clear-database
sorry, I do not understand what you are talking about
I’m glad, that your issues are resolved now…
Taifun