isconnected() Method

Returns a value that indicates whether there is a connection to the database.

Syntax

connection.isconnected()

Returns

Returns True or False.