Files
mql5-skills/skills/mql5/references/docs/30-database/1041-database-databaseclose.md
T
2026-06-23 21:47:51 +08:00

31 lines
691 B
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DatabaseClose
Closes a database.
```
void  DatabaseClose(
   int  database      // database handle received in DatabaseOpen
   );
```
Parameters
database
[in]  Database handle received in [DatabaseOpen()](/en/docs/database/databaseopen).
Return Value
None.
Note
After calling DatabaseClose, all [handles of requests ](/en/docs/database/databaseprepare) to the database are automatically removed and become invalid.
If the handle is invalid, the function sets the ERR_DATABASE_INVALID_HANDLE error. You can check the error using GetLastError().
See also
[DatabaseOpen](/en/docs/database/databaseopen), [DatabasePrepare](/en/docs/database/databaseprepare)