Sqlite db on the web

Hello.
I have sqlite db on the web: https://drive.google.com/file/.....
How can I use it in the mobile app?
Approach:

  • EXPORT from extension....Sqlite1
  • IMPORT from extension....Sqlite1
    I keep getting open failed: EISDIR.....
    On which website is it appropriate to place the sqlite file?
    The app where I use sqlite db on a local mobile works for me...

Ondrej

Download it into the ASD of your app and import it from there, you can use the web component to download it directly into ASD

Alternatively use

Taifun

well thank you

ondrej

Hello.
The app pretends that the download to ASD was successful.....DownloadCompleted...
I have both WriteExternalSorage and ReadExternalSorage set....
Unfortunately, IMPORT db sqlite from ASD will not be done.....
Not from Companion....not from .apk
Can anyone help?

Ondrej

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hello.
I send blocks.
The app should:

  • download dbKnihy.sqlite from https://drive.google.com/file/.....
  • do IMPORT to ASD and then EXPORT
  • find out the number of entries in the tblKnihy table and write them on label7...
    Unfortunately, the app only prints ERROR: NO SUCH table: tblKnihy.
    And at the same time, DownloadToASD1.DovnloadCompleted will run fine...




Ondrej

Download the file
And after it has been downloaded, import it

Also there is no sense to export it directly again
Taifun

I fixed it like that.
But alas, the same error again.
Should it work like that in Companion too?

Ondrej

Show us an updated screenshot of your relevant blocks
Also remove the / in the filename of the Import method

From the documentation at App Inventor Extensions: SQlite | Pura Vida Apps

As fileName just use the filename without slashes

Taifun

Hello.
Unfortunately, I found out that db.sqlite is not suitable for multiple users ... So I got a web hosting for MySQL. Are there any examples please?
Ondrej

This is not true. Of course it can handle multiple users. You setup a users table in much the same way as one would do for mySql, and require a successful "login" before performing actions on the data, and you could log a users actions in another table.

As with any database there are limits:

https://www.sqlite.org/whentouse.html

well, usually SQlite is used as local database, this is what the extension can offer,
but as @TIMAI2 already mentioned, you can also use SQlite also as server database

But in this case my sqlite extension will not be able to help anymore...

MySQL is another server database, see also my tutorial here

Taifun

well thank you

Ondrej