Microsoft SDK for Java

clear

This method of the Errors class removes all the objects in a collection.

Syntax

public void clear();

Use the clear method on the Errors collection to remove all existing Error objects from the collection. When an error occurs, ADO automatically clears the Errors collection and fills it with Error objects based on the new error.

Some properties and methods return warnings that appear as Error objects in the Errors collection but do not halt a program's execution. Before you call Recordset.resync, Recordset.updateBatch, Recordset.cancelBatch, Connection.open, or Recordset.setFilter, call the clear method on the Errors collection. That way, you can read the count of the Errors collection to test for returned warnings.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.