The ActiveX Data Object (ADO) module enables C++ and Visual Basic programs to connect to different databases and SQL servers. It includes several objects, such as the ADO parameter object. This object has all the information about a single parameter used in the query or stored procedure.
A parameter collection has the parameter object
after the creation of the object. Parameter collection is associated with the specific Command object. It uses the collection to pass the parameters.
We can also create parameterized commands with the help of parameters. There are four types of parameters:
The parameter object has certain methods and properties associated with it, which are described below:
Delete
: Deletes the object from the parameters collection.
AppendChunk
: Appends long binary and character data to the parameter object.
Name
: Sets or returns the name of the parameter object.
Size
: Sets or returns the maximum size of a parameter object’s value in either bytes or characters.
Type
: Sets or returns the DataTypeEnum
value. In the case of a parameter object, the type
property is read/write.
Value
: Sets or returns the object’s value, which is dependant on the Type
property. It can be either read/write or read-only.
Attributes
: Sets or returns the characteristics of an object. This property is read/write for a parameter object, and its default value is AdParamSigned
.
Direction
: Sets or returns how a parameter is passed to or from a procedure. It is a read/write property.
Precision
: Sets or returns the maximum number of digits allowed when we want to represent a numeric value. The value is returned as a byte
value.
NumericScale
: Sets or returns a byte
value containing the maximum number of digits stored on the right side of the decimal point for a numeric type of parameter object. In this case, it is read/write.
Free Resources