fernando.rosales
Registered User.
- Local time
- Today, 07:43
- Joined
- Jun 11, 2014
- Messages
- 27
Hi guys I am having an issue with a database when creating a Oracle DSN.
I am getting an error 3146 ODBC call failed. Source DAO.dbEngine
This is only happening on 1 computer, I've tried on 9 others and they work fine, only this specific error on 1 computer.
I have call a module to create the DSN
This last piece is where it gets the error message. Why would this happen on only 1 computer?
I am getting an error 3146 ODBC call failed. Source DAO.dbEngine
This is only happening on 1 computer, I've tried on 9 others and they work fine, only this specific error on 1 computer.
I have call a module to create the DSN
Code:
Call UserDSN.CreateOracleDSN("XXX XXXX", "XXXX", "xxxxxxx", "xxxxxx", True)
Code:
Public Sub CreateOracleDSN(dsnName As String, tnsServiceName As String _
, DESCRIPTION As String, userID As String _
, silentInstall As Boolean)
Dim driverName As String
driverName = "Oracle in OraHome92"
Dim myDSN As DSNSettings
With myDSN
.dsnName = dsnName
.driverName = driverName
.silentInstall = silentInstall
.attributes = "Description=" & DESCRIPTION & vbCr & _
"ServerName=" & tnsServiceName & vbCr & _
"UserID=" & userID
End With
Call RegisterDB(myDSN)
End Sub
Code:
Private Sub RegisterDB(args As DSNSettings)
On Error GoTo errregfail:
With args
DBEngine.RegisterDatabase .dsnName, .driverName, .silentInstall, .attributes
End With
Exit Sub
errregfail:
MsgBox "An error has occurred and I was not able to create the DSN. " & vbCrLf & _
"Error: " & Err.Number & ": " & Err.DESCRIPTION & vbCrLf & _
"Source: " & Err.Source
End Sub