Package com.ms.com Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class SafeArray

public final class SafeArray
{
}

The SafeArray class is a Java wrapper for the SAFEARRAY data type defined by COM.

The SafeArray class itself has no methods; you don't manipulate its contents yourself. The most common use of SafeArray is as a bookmark. For example, when using Data Access Objects (DAO), you get a SafeArray object as a bookmark. The contents of the bookmark itself are not meaningful; you simply pass it back to to another DAO method when you need to refer to a bookmarked location.

For example, to save your position within a RecordSet while using DAO:

SafeArray currRec = recordset.getBookmark();
// do other stuff
// come back later
recordset.setBookmark( currRec );

There is never a need to examine the value of the bookmark.

Various other properties in DAO are also bookmarks. For example, the CacheStart and LastModified properties in the RecordSet interface are also bookmarks, and are represented in Java using the SafeArray class.

For more information on DAO, see the DAO SDK.

See also package com.ms.com.

© 1996 Microsoft Corporation. All rights reserved.