Đối tượng tham số ADO
Đối tượng tham số
Đối tượng Tham số ADO cung cấp thông tin về một tham số duy nhất được sử dụng trong một thủ tục hoặc truy vấn được lưu trữ.
Đối tượng Tham số được thêm vào Bộ sưu tập Tham số khi nó được tạo. Bộ sưu tập Tham số được liên kết với một đối tượng Lệnh cụ thể, đối tượng này sử dụng Bộ sưu tập để chuyển các tham số vào và ra khỏi các thủ tục và truy vấn được lưu trữ.
Các tham số có thể được sử dụng để tạo các Lệnh được Tham số hóa. Các lệnh này (sau khi chúng đã được định nghĩa và lưu trữ) sử dụng các tham số để thay đổi một số chi tiết của lệnh trước khi nó được thực thi. Ví dụ, một câu lệnh SQL SELECT có thể sử dụng một tham số để xác định tiêu chí của mệnh đề WHERE.
Có bốn loại tham số: tham số đầu vào, tham số đầu ra, tham số đầu vào / đầu ra và tham số trả về.
Cú pháp
objectname.property
objectname.method
Tính chất
Property | Description |
---|---|
Attributes | Sets or returns the attributes of a Parameter object |
Direction | Sets or returns how a parameter is passed to or from a procedure |
Name | Sets or returns the name of a Parameter object |
NumericScale | Sets or returns the number of digits stored to the right side of the decimal point for a numeric value of a Parameter object |
Precision | Sets or returns the maximum number of digits allowed when representing numeric values in a Parameter |
Size | Sets or returns the maximum size in bytes or characters of a value in a Parameter object |
Type | Sets or returns the type of a Parameter object |
Value | Sets or returns the value of a Parameter object |
Phương pháp
Method | Description |
---|---|
AppendChunk | Appends long binary or character data to a Parameter object |
Delete | Deletes an object from the Parameters Collection |