sql:close
Closes the database connection.
Attributes
|
| The database connection. The value is an expression, which must evaluate to a database connection object as returned by sql:connect. |
Saxon availability
Requires Saxon-PE or Saxon-EE. Available for Java only.
Details
Note that the JDBC documentation advises calling "commit" or "rollback" before closing the connection; the effects of not doing so are said to be implementation-defined. It is possible to issue a commit or rollback request using the sql:execute instruction.
It is important to avoid closing the connection before database access is finished. For
example, if database query results are obtained using sql:query
and saved in a variable,
database query might not be finished until the contents of the variable have actually been read.