Creates a new Parameter object with the specified properties.
Set parameter = command.CreateParameter (Name, Type, Direction, Size, Value)
Returns a Parameter object.
Use the CreateParameter method to create a new Parameter object with a specified name, type, direction, size, and value. Any values you pass in the arguments are written to the corresponding Parameter properties.
This method does not automatically append the Parameter object to the Parameters collection of a Command object. This lets you set additional properties whose values ADO will validate when you append the Parameter object to the collection.
If you specify a variable-length data type in the Type argument, you must either pass a Size argument or set the Size property of the Parameter object before appending it to the Parameters collection; otherwise, an error occurs.
If you specify a numeric data type (adNumeric or adDecimal) in the Type argument, then you must also set the NumericScale and Precision properties.
Visual Basic Example | Visual C++ Example | Visual J++ Example
Append Method | Parameter Object | Parameters Collection
Applies To: Command Object