Name

Recordset.close — close an open recordset

Synopsis

void Recordset.close ( );  

Description

Closes an open recordset. You should not try to access the recordset after calling this method.

You should take care to explicitly close any recordsets that you open. Although this is not necessary on all platforms, it is good practice and the safest way to program.

Example 65. Recordset.close Example

Recordset rs = conn.openrs("SELECT * FROM mytable");
if(rs == null)
{
    %><p>Error: <%=htmlencode(error())%></p><%
}
else
{
    // Do stuff.....

    rs.close();
}

See Also

Data sources and database access in RSP is explained in the section called “Accessing Databases”