Name
Command.CreateParameter Method — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
Setparameter = command.CreateParameter(Name, Type, Direction, Size, Value)
The CreateParameter method creates and returns a new parameter with the information supplied.
Arguments
-
Name(String) Optional. Contains the desired name of the new parameter. This argument is mapped to the Parameter.Name property.
-
Type(DataTypeEnum) Optional. Indicates the desired datatype of the new parameter. This argument is mapped to the Parameter.Type property. The default value is
adEmpty.
-
Direction(ParameterDirectionEnum) Optional. Indicates the desired direction of the new parameter. This argument is mapped to the Parameter.Direction property. The default value is
adParamImput.
-
Size(Long) Optional. Specifies the maximum length of the newly created parameter in either characters or bytes if the Type parameter is set to a variable-length datatype. This argument is mapped to the Parameter.Size property.
-
Value(Variant) Optional. Is used to initialize the value of the newly created Parameter object. This argument is mapped to the Parameter.Value property.
Returns
Parameter object
Description
With the CreateParameter method of the Command object, you can create a new Parameter object with the information that you specify, including name, type, direction, size, and value. When you create a new Parameter object with this method, the parameter is not automatically added to the Parameters collection of the chosen Command object. The Append ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access