Append Method
Appends an object to a collection.
Syntax
collection.Append Object
The collection placeholder represents the collection to which you want
to append an object. The Object placeholder is an object
variable representing the object you wish to append.
Remarks
Use the Append method on a collection to add an object to that
collection. This method is available only on the Parameters
collection of a Command object. You must set the
Type property of a Parameter
object before appending it to the Parameters collection. If you select
a variable-length data type, you must also set the Size
property to a value greater than zero.
By describing parameter yourself, you can minimize calls to the provider and
consequently improve performance when using stored procedures or parameterized
queries. However, you must know the properties of the parameters associated
with the stored procedure or parameterized query you wish to call. Use the CreateParameter
method to create Parameter objects with the appropriate property
settings and use the Append method to add them to the Parameters
collection. This lets you set and return parameter values without having to
call the provider for the parameter information. If you are writing to a
provider that does not supply parameter information, you must manually
populate the Parameters collection using this method to be able to use
parameters at all.
Applies To
Parameters
See Also
CreateParameter, Delete
|