ADO 2.5 API Reference

Name Property

Indicates the name of an object.

Settings and Return Values

Sets or returns a String value that indicates the name of an object.

Remarks

Use the Name property to assign a name to or retrieve the name of a Command, Property, Field, or Parameter object.

The value is read/write on a Command object and read-only on a Property object.

For a Field object, Name is normally read-only. However, for new Field objects that have been appended to the Fields collection of a Record, Name is read/write only after the Value property for the Field has been specified and the data provider has successfully added the new Field by calling the Update method of the Fields collection.

For Parameter objects not yet appended to the Parameters collection, the Name property is read/write. For appended Parameter objects and all other objects, the Name property is read-only. Names do not have to be unique within a collection.

You can retrieve the Name property of an object by an ordinal reference, after which you can refer to the object directly by name. For example, if rstMain.Properties(20).Name yields Updatability, you can subsequently refer to this property as rstMain.Properties("Updatability").

See Also

Visual Basic Example | Visual C++ Example | Visual J++ Example

Applies To: Command Object | Field Object | Parameter Object | Property Object

© 1998-2003 Microsoft Corporation. All rights reserved.