CLOSE THE DATABASE CONNECTION

March 22, 2022 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp
CLOSE THE DATABASE CONNECTION:

It is not necessary to close the connection, but open database can cause problems, so its better to close the database connection.
For this close( ) method is used.

Syntax:
stmt.close( );
Here, stmt is statement object to be closed.

cn.close( );

Here, cn is the connection object to be closed.

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion