Purpose The <dbremove> statement is used to remove a created connection to a database that was created via the <dbconnect> statement or a recordset that was selected from the database via the <dbselect> statement. This first implementation of the Superx++ run-time engine for Microsoft Windows uses an ODBC connection for this.

The purpose of removing a recordset is to force the Superx++ run-time engine to re-query the database directly for data rather than relying on its cached data in the recordset. The Superx++ run-time engine will automatically use the cached data in the recordset if the SQL SELECT statement is identical so as to increase the efficiency of Superx++ programs that use them. However, you may wish to override this feature in situations where you believe the data to have been changed on the database since the last time the Superx++ run-time engine queried it directly. The reason for removing a database connection is to release it so that other processes can use it, in a situation of limited available connections.

Format <dbremove connection="{conn name}" />

<dbremove connection="{conn name}" recordsetsql="{sel stmt}" />

{conn name} the name of the connection object to be removed
{sel stmt} the SQL SELECT statement that was executed via the <dbselect> statement that produced the recordset
Example #1 <dbremove connection="MyDbConn" />

removes a database connection called MyDbConn that was created using the <dbconnect> statement.

Example #2 <dbremove connection="MyDbConn" recordsetsql="select EmpName, EmpID from Employees where EmpID = 9000;" />

removes a database recordset whose SQL SELECT statement is as shown from the MyDbConn connection that was created using the <dbconnect> statement.