You can debug a custom OLE Automation server created by using 32-bit Microsoft® Visual Basic® version 4.0. To do this, Visual Basic must be installed on the Microsoft SQL Server™ computer, and SQL Server must be running under the same Microsoft Windows NT® user account as Visual Basic. SQL Server must be started from the command prompt and independently of the Windows NT Service Control Manager (by using the sqlservr /c command), or the SQL Server service must be started under the same Windows NT user account used to log on to the system.
To debug a custom OLE Automation server
This registers and runs your custom OLE Automation server.
When a breakpoint is hit, the Visual Basic debugger is activated.
For more information, see your documentation for Visual Basic.
A custom, in-process OLE server created using 32-bit Visual Basic 4.0 must have an error handler (specified with the On Error GoTo statement) for the Class_Initialize and Class_Terminate subroutines. The error handlers will prevent unhandled errors from occurring in the subroutines. Unhandled errors in the Class_Initialize and Class_Terminate subroutines can cause unpredictable SQL Server problems, such as a SQL Server access violation. Error handlers for other subroutines are also recommended.
How to create an OLE Automation object (Transact-SQL)
Data Type Conversions Using OLE Automation Stored Procedures