db .close()

Description:

Close a datasource connection.

Syntax:

db.close()

Note:

Close a database connection. By default, data will be committed before closing the database.

Parameters:

db

Database connection

Example:

 

A

 

1

=connect("demo")

 

2

>A1.close()

Close the connection to database demo

Note:

connect and close must be used in pairs; otherwise, the connection cannot be closed.

Related functions:

connect()

db.error()

db.commit()

db.rollback()