I am receiving an ORA-03106 error when I try to access the database using MS ADO. This problem is only occurring on Windows 7 64 bit machines. Apparently there were issues with XP in the past, but they were fixed by some registry edits. These registry edits did nothing when applied to the Windows 7 machine.
I don't have much information about the database because that is handled by a different department, I am an intern and this problem was just thrown at me with very little background info. Here is the code, I get the error on the MyConnection.Open line.
Function db_fetch(sIButtonID, ByRef lstatus, sdescr) As tIBRec
Dim myRecordSet As ADODB.Recordset
'Dim sConnectString As String
Dim sSQL_Statement As String
Dim this_ibutton As tIBRec
Set myRecordSet = New ADODB.Recordset
If Not CheckForNetDrive("O:") Then
lstatus = Shell("net use O: \\host\oracle /PERSISTENT:YES")
If Not CheckForNetDrive("O:") Then lstatus = MapNetworkDrive("O:", "\\host\oracle")
If lstatus = 0 Then
If InStr(GetEnvironmentVar("PATH"), "orawin95\bin") = 0 Then
lstatus = SetEnvironmentVariable("PATH", GetEnvironmentVar("PATH") & ";O:\orawin95\bin")
End If
End If
Else
If InStr(GetEnvironmentVar("PATH"), "orawin95\bin") = 0 Then
lstatus = SetEnvironmentVariable("PATH", GetEnvironmentVar("PATH") & ";O:\orawin95\bin")
End If
End If
'sConnectString = "Provider=msdaora;Data Source=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=12)(SERVER=DEDICATED)));User Id=username;Password=password;"
'sConnectString = "Provider=msdaora;Data Source=(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=03)(SERVER=DEDICATED)));User Id=username;Password=password;"
'sConnectString = "Provider=msdaora;Data Source =(DESCRIPTION=(SOURCE_ROUTE=OFF)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521)))(CONNECT_DATA=(SID=03)(SERVER=DEDICATED)))User Id=username;Password=password;"
'On Error GoTo err:
If myConnection.State = 0 Then
myConnection.Mode = adModeReadWrite
myConnection.Open sConnectString
End If