ADOBC Connection Fails on Windows 10 Machines Only

Viewed 2065

I'm fairly new to working with Access/VB (started 2 months ago) so bear with me.

I inherited a database that has an ADODB connection to Oracle that works perfect on the Windows 7 machines that it's been tested on (a total of 5), but gives the following error when tested on Windows 10 machines (total of 2). (All machines are running Access 2010).

Run-time Error '3709': The connection cannot be used to perform this operation. It is either closed or invalid in this context.

Here's the code:

Public Function PTMNConnect() As ADODB.Connection
  Dim Cn As ADODB.Connection
  Dim Conn As String

  Conn = "DRIVER={Microsoft ODBC for Oracle};CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)" & _
           "(HOST=host)(PORT=port))(CONNECT_DATA=(SERVICE_NAME=PROD)));uid=username;pwd=password"
  Set Cn = New ADODB.Connection

  With Cn
    .ConnectionString = Conn
    .CursorLocation = adUseServer
    .Open  '**Errors Out on Open**
  End With

  Set PTMNConnect = Cn
End Function

I've been racking my brain and searching everywhere for a possible solution to this for the past two days with no luck.

Here's what I've tried/verified so far based on other posts I'd seen:

  1. Verified that the Oracle client was installed
  2. Ensured that the Path variable contained the necessary paths
  3. Verified the references and file paths are the same on all machines

Any insight or references that you may be able to provide would be greatly appreciated!

1 Answers
Related