Closing a SQLite database

Hello everybody,
I have an app which starts by opening an Intro window and selecting a specific database (SQLite) according to a year specified in a DesktopTextField the opens a listbox in a different window.
My problem is that if I come back to the Intro window and change the year (after issueing a DB.Close command before leaving the second window, I still get the last DB opened. There is no change of database when I digit a different year.
Is the DB.Close command enough or do I have to use something else?

Thank you

Try DB = Nil

Instead of closing and in the same code line of closing?

Without looking at some of your code or a sample project, will be hard to know what is the problem.

1 Like

https://www.dropbox.com/scl/fi/5y6584w223yk3pcdfbypi/Tst-521-Procedure-Marzolara-copia.xojo_binary_project?rlkey=o46fgo6hl1eezw7s8ho0mn4ry&st=siluzf5t&dl=0

This is the link to the test project.
Thanks for any help

Next line, when you are sure you do not need DB anymore.

Try, it cost nothing.

You already have used DB = Nil (In File New I think).

You can make a search for DB and Sort the results as below

stunning !

Meal is hot here…

Let’s see the code in the Intro window.

Just load the project and watch !

I will. Tomorrow, it’s 10PM here. Have a good night

Did you fix the project, by any chance?
In case, where is it? I cannot find it

No. Since the images are missing, I stopped there and like you I was going to sleep.