How to create an OLE Automation object (Transact-SQL)
To create an OLE Automation object
- Call sp_OACreate to create the object.
- Use the object.
- Call sp_OAGetProperty to get a property value.
- Call sp_OASetProperty to set a property to a new value.
- Call sp_OAMethod to call a method.
- Call sp_OAGetErrorInfo to get the most recent error information.
- Call sp_OADestroy to destroy the object.
Note All of these steps must be performed within a single Transact-SQL statement batch. All created OLE objects are destroyed automatically at the end of each statement batch.
See Also
System Stored Procedures
Data Type Conversions Using OLE Automation Stored Procedures
How to debug a custom OLE Automation server (Transact-SQL)
OLE Automation Sample Script
(c) 1988-98 Microsoft Corporation. All Rights Reserved.