ออบเจ็กต์พารามิเตอร์ ADO
วัตถุพารามิเตอร์
ออบเจ็กต์พารามิเตอร์ ADO ให้ข้อมูลเกี่ยวกับพารามิเตอร์เดียวที่ใช้ในกระบวนงานที่เก็บไว้หรือแบบสอบถาม
วัตถุพารามิเตอร์จะถูกเพิ่มไปยังคอลเลกชันพารามิเตอร์เมื่อถูกสร้างขึ้น คอลเล็กชันพารามิเตอร์เชื่อมโยงกับออบเจ็กต์คำสั่งเฉพาะ ซึ่งใช้คอลเล็กชันเพื่อส่งพารามิเตอร์เข้าและออกจากโพรซีเดอร์และคิวรีที่เก็บไว้
สามารถใช้ Parameters เพื่อสร้าง Parameterized Commands คำสั่งเหล่านี้ (หลังจากกำหนดและจัดเก็บแล้ว) โดยใช้พารามิเตอร์เพื่อแก้ไขรายละเอียดบางอย่างของคำสั่งก่อนที่จะดำเนินการ ตัวอย่างเช่น คำสั่ง SQL SELECT สามารถใช้พารามิเตอร์เพื่อกำหนดเกณฑ์ของส่วนคำสั่ง WHERE
พารามิเตอร์มีสี่ประเภท: พารามิเตอร์อินพุต พารามิเตอร์เอาต์พุต พารามิเตอร์อินพุต/เอาต์พุต และพารามิเตอร์ส่งคืน
ไวยากรณ์
objectname.property
objectname.method
คุณสมบัติ
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 |
วิธีการ
Method | Description |
---|---|
AppendChunk | Appends long binary or character data to a Parameter object |
Delete | Deletes an object from the Parameters Collection |