Microsoft KB Archive/814578

= PRB: OLE Automation Error Occurs When SQL Server Runs a Stored Procedure =

Article ID: 814578

Article Last Modified on 5/2/2003

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



SYMPTOMS
When you run a stored procedure in Microsoft SQL Server 7.0, the execution might fail, and you receive an error message similar to the following:

-2147467259

OLE Automation Error(s) Information

HRRESULT: 0x

Source : Provider

Description : Unspecified error

procerror

-or-

Server : Msg 7390, Level 16, State 1, Procedure , Line

The requested operation could not be performed because the OLE DB provider '' does not support the required transaction interface.

-2147467259

OLE Automation Error(s) Information

HRRESULT: 0x

Source : Provider

Description : Unspecified error

procerror



CAUSE
This behavior can occur when you run a stored procedure that internally calls the sp_oacreate system stored procedure to create an instance of a Component Object Model (COM) object, and the COM component was developed with Microsoft Visual Basic.



RESOLUTION
To resolve the problem, use any one of the following methods:  Run the COM object outside the SQL Server memory address space.

By default, a DLL-based COM object is loaded in the SQL Server process memory address space; therefore it has the potential to overwrite the memory space of SQL Server. To avoid any error caused by the COM object, run the COM object outside the SQL Server memory address space.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

198891 INF: Enabling DLL-Based COM Object Execution Outside SQL Server

 Compile the Visual Basic DLL files with the Retained In Memory and the Unattended Execution options selected.

Compile all the DLL files of the COM component with the Retained In Memory, and the Unattended Execution options selected. To do so, follow these steps:  Open the project that corresponds to the DLL file in Microsoft Visual Basic. On the Project menu, click to select  Properties. On the General tab of the <Project-Name> Properties dialog box, click to select the Unattended Execution and the Retained In Memory check boxes.</li> Click OK.</li> Compile the project to make a new DLL.</li></ol>

Microsoft provides a utility that is named VBCHKW2K that you can use to detect all the Visual Basic ActiveX DLL files that are not compiled with the Unattended Execution and the Retained In Memory options enabled.

For additional information about the VBCHKW2K utility, click the following article number to view the article in the Microsoft Knowledge Base:

286036 SAMPLE: Using VBCHKW2K to Isolate DLLs Compiled Without Retain In Memory and Unattended Execution

</li></ul>

Note: If the problem still persists, restart SQL Server. That might solve the problem.

<div class="references_section">