How do I get the ID of a database?

Bob Sneidar bobsneidar at
Fri Jul 9 19:35:59 EDT 2021

Yeah thanks Rick, I know I can store the database id, I was hoping to simply call a function that could tell me what database name the ID belonged to, but apparently that is not a persistent thing. 

I stored it in a script local variable in the card that creates the database, then I have a custom property"memorydb"  that returns that stored value when I need it. 

What I cannot do however is close a database even if I have it's ID. I can close CURSORS, but not databases. I don't guess it's all that important. 

Bob S

> On Jul 9, 2021, at 16:30 , Rick Harrison via use-livecode <use-livecode at> wrote:
> Hi Bob,
> When you open the database with revOpenDatabase you assign the whole thing to yourDatabaseID.
> Look it up in the dictionary towards the end and you’ll find what I’m referring to.
> yourDatabaseID will be an integer and you will use that to refer to your database for other functions.
> Hope that helps!
> Rick

More information about the use-livecode mailing list