How can I access SQLite db of Screen1 from Screen2?

I have an app that opens a SQLite db (I 'm using Bennedum 's SQLite component) in Screen1.
Then I open Screen2.
I want from Screen2 to gain access to the db opened in Screen1.
How can I do it?

1 Like

Either send the values you want using start value block or use tinyDB to save the values you wish and use them in any screen.

For example if you use a ListView to show users

1 Like

And what if I want to save data from Screen2 to the db?
I save tha data in the TinyDB?
And when I open Screen1 I save the data from the TinyDB to the SQLite db?

1 Like

If you use virtual screens instead of real screens then this problem goes away.

1 Like

What are virtual screens? :thinking:

1 Like

These are vertical arrangements in one screen that act like screens.

2 Likes

Arrangements set visible and invisible according to needs

3 Likes

Thank you!! I'll try them!

3 Likes

See also Building Apps with Many Screens

2 Likes

Just done a little bit of testing, using Companion with Taifun's SQLite extension and two screens.
Drag out the extension to each screen.

I import a db on Screen 1
Go to Screen 2
Can run a query on Screen 2 without needing to import again :smiley:
Editing/updating data also works.

3 Likes

You 're right, I tried with Bennedum 's SQLite extension and it worked after I called the openDatabase method!

1 Like

You can use this extension: https://ullisroboterseite.de/android-AI2-CommonEvents-en.html

1 Like