IMind soft

Author's software

Development

Design

Designing

Being tested

closedb function

The closedb function is like the "Close the door" button after you've done everything in the database. I wrote, saved, looked... that's it, it's time to say goodbye. Without this goodbye, the database will continue to hang in the system, there are resources and at some point it may start acting up. Do we need it? No.

It is formally called like this:

closedb(dbid)

>

Where dbid is the same variable that you got when you opened the database using opendb(). You can close anything without it, but not what you need.

Now, step by step, what closedb does under the hood. Meanwhile, you can take a sip of coffee.

Sends a signal to the base: "That's it, we're done, we can close. "

He waits for a polite "OK, I'm closed." Yes, it's better to double-check, otherwise you never know.…

Cleans up after herself — frees up memory, files, and generally everything that she took from the system.

Updates the status: "The database is closed, everything is fine." Whether it's in the log file or in the interface depends on how everything works for you.

Of course, all this may vary slightly depending on the language or platform. But the point is the same: closedb is the final scene. Without it, the program is like a series without titles — something is wrong, as if they forgot to finish.

So don't skip this step. Closed the base — freed up resources, avoided trouble. And he went on with a clear conscience.



Help on built-in functions
The rules of programming scripts
Programm options
Color constants

Top.Mail.Ru