Parameters Collection
Connection Properties Collection
Field Properties Collection
Parameter Properties Collection
Record Properties Collection
Recordset Properties Collection
COLLECTION: Command::Properties Collection
The
Properties Collection
is a collection of
Property
objects. Each
Property
object contains a single piece of information, called a dynamic property, about the database provider. By referring to the
Properties Collection
, each connection to a provider can be tailored specifically by ADO to suit the exact needs of that provider.
This ability to be flexible when handling the various idiosyncrasies of individual database providers greatly enhances the usefulness of ADO.
The
Connection, Field, Parameter, Record
and
Recordset
objects also have access to the
Properties Collection
.
The
Properties Collection
has two properties and one method.
PROPERTIES
Count Property
The
Count
property returns a long value that is the number of items in the collection. The counting starts at zero. You can use this value to loop through the collection by iterating from zero to the value of
Count
minus one.
Code (VBScript):
intCountNumber = objCommand.Properties.
Count
You can also use the VB/VBScript
For Each ... Next
statement.
Code (VBScript):
For Each objProperty In objCommand.Properties
' place code here to manipulate each item in collection
Next
Item Property
The
Item
property is used to return a specific member of the
Properties Collection
. The
Index
parameter is a variant. It can be the named item or the position (ordinal) number.
Code (VBScript):
MyProperty = objCommand.Properties.
Item(5)
Or:
MyProperty = objCommand.Properties
(5)
Or:
MyProperty = objCommand.Properties
("Transaction DDL")
METHODS
Refresh Method
The
Refresh
method updates the
Property
objects in the
Properties Collection
with the dynamic property information specific to the provider. It is quite possible that the provider has dynamic properties that are not supported by ADO.
Code (VBScript):
objCommand.Properties.
Refresh
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information