Article ID: 816633
Article Last Modified on 12/3/2007
APPLIES TO
- Microsoft ActiveX Data Objects 2.7
- Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
- Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
- Microsoft Windows Server 2003, Standard Edition (32-bit x86)
- Microsoft Windows Server 2003, Web Edition
- Microsoft Windows XP Professional for Itanium-based systems
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
- Microsoft Windows Small Business Server 2003 Premium Edition
- Microsoft Windows Small Business Server 2003 Standard Edition
SYMPTOMS
When you open a Microsoft OLE DB provider for Oracle from a transactional component in Microsoft COM+ that uses an ActiveX Data Objects (ADO) connection, you may receive the following error message:
And the following error is logged into the Event log:
CAUSE
By default, when you install Oracle 9.x clients, the NetworkServices account does not have access permissions to the Oracle folder. Because Microsoft Distributed Transaction Coordinator (MSDTC) runs under a NetworkServices account in both Windows Server 2003 and Windows XP, MSDTC cannot load Oracle DLLs. Because MSDTC runs as LocalSystem in Windows 2000, you do not experience this behavior on a Windows 2000-based operating system.
WORKAROUND
To work around this problem, provide the NetworkServices account with access to all Oracle folders.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce the Behavior
- Install Oracle 9i Application Server on a computer running the Windows Server 2003-based system.
- Enable Oracle XA Transaction Support for COM+.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:193893 INFO: Using Oracle with Microsoft Transaction Server and COM+
- Create a new ActiveX DLL project in Microsoft Visual Basic 6.0. By default, Class1 is created.
- On the Project menu, click Project1 Properties. Change the project name to MyOracleComponent.
- On the Project menu, click References. Add a reference to Microsoft ActiveX Data Object 2.0, and then to Library COM+ Services Type Library.
Add the following code to Class1:
Option Explicit Public Sub TestSub() Dim objContext As ObjectContext Set objContext = GetObjectContext() Dim cnn As New ADODB.Connection Dim rec As New ADODB.Recordset cnn.Open "Provider=MSDAORA;Data Source=ORCL;", "scott", "tiger" Set rec = cnn.Execute("select * from TableName") objContext.SetComplete End Sub
- On the File menu, click Make MyOracleComponent.dll.
- Click Start, point to Settings, and then click Control Panel.
- Double-click Administrative Tools, and then double-click Component Services.
- Expand Component Services until you reach COM+ Applications.
- Right-click COM+ Applications, and then click New Application.
- Create a new library application, and then install the MyOracleComponent.dll in COM+.
- In COM+, right-click Component, and then click Properties. Click the Transactions tab, and then click Required.
- Click OK to save the settings.
- To create a client application, create a new Standard EXE project in Visual Basic 6.0.
Add the following code to the Form1_Load event:
Option Explicit Private Sub Form_Load() Dim obj1 As Object ' Create the COM+ Object Set obj1 = CreateObject("MyServerName.Class1") obj1.TestSub Set obj1 = Nothing End Sub
- Click Start. You receive the error message that is described in the "Symptoms" section.
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
Keywords: kboracle kbdatabase kbprb kberrmsg KB816633