Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reserved error -7778

Status
Not open for further replies.

lgullapudi

Programmer
Oct 30, 2012
6
US
I am getting error while refreshing the link (tdftable.RefreshLink ).Exact error is "Reserved error -7778 ,there is no message for this error"
Earlier it was working fine..after DB upgrade from 10g to 11g..its not working...can you please help me whats the exact probalem and alternate solution to this.

code:

Option Compare Databasecode
Option Explicit
Dim mstrUserId As String
Dim mstrPassword As String
Const theConnectString = "usa0300uz1196.apps.mc.xerox.com:1551/PIPSS102;"

Function ValidateInput() As Boolean
Dim strConnect As String
Dim strValid As String
Dim con As ADODB.Connection
Dim cmd As ADODB.Command
Dim rs As ADODB.Recordset

' A username must be entered
txtUsername.SetFocus
If Len(txtUsername.Text) = 0 Then
MsgBox "Username is missing.", vbExclamation, "SOLOS - D1J"
ValidateInput = False
Exit Function
End If

' A password must be entered
txtPassword.SetFocus
If IsNull(txtPassword) Then
txtPassword.Value = ""
End If
If Len(txtPassword.Text) = 0 Then
MsgBox "Password is missing.", vbExclamation, "SOLOS - D1J"
ValidateInput = False
Exit Function
End If

strConnect = "DRIVER={Microsoft ODBC for Oracle};" & _
"SERVER=" & theConnectString & _
"UID=" + "D1JLOGIN" + ";" & _
"PWD=" + "NIGOLJ1D" + ";"
Set con = New ADODB.Connection
con.ConnectionString = strConnect
con.Open

Set cmd = New ADODB.Command
cmd.ActiveConnection = con
cmd.CommandText = "SOLOS.D1J_LOGIN"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters("insUserId") = txtUsername.Value
cmd.Parameters("insPassword") = txtPassword.Value
cmd.Parameters("innMdbVersion") = 1

Set rs = cmd.Execute

strValid = cmd.Parameters("outsValid")

If strValid <> "Y" Then
If strValid = "I" Then
MsgBox "Username / Password is not valid", vbExclamation, "SOLOS - D1J"
ElseIf strValid = "V" Then
MsgBox "Your SOLOS D1J access database is obsolete and needs to be replaced with the latest version.", vbExclamation, "SOLOS - D1J"
Else
MsgBox "An unexpected user id validation error as occurred.", vbExclamation, "SOLOS - D1J"
End If
ValidateInput = False
Exit Function
End If

'these are used later to refresh the conneciton to the master file view
mstrUserId = cmd.Parameters("outsUserId")
mstrPassword = cmd.Parameters("outsPassword")
ValidateInput = True
End Function
Function InitializeConnection() As Boolean
Dim strConnect As String
Dim dbs As DAO.Database
Dim tdfTable As DAO.TableDef

On Error GoTo ErrorHandler

Set dbs = CurrentDb

'note that mstrUserid and mstrPassword are retrieved from a previious
'call to the D1J_LOGIN stored procedure


strConnect = "DRIVER={Microsoft ODBC for Oracle};" & _
"SERVER= " & theConnectString & _
"UID= D1JRUN;" & _
"PWD=D1JRUN83A;"

' Refresh Access Linked Tables
For Each tdfTable In dbs.TableDefs
' Only attempt to refresh link on tables that already
' have a connect string (linked tables only)
If Len(tdfTable.Connect) > 0 Then
' Set the tables connection string
tdfTable.Connect = strConnect

' Refresh the link to the table
tdfTable.RefreshLink

End If


Next

InitializeConnection = True
Exit Function

ErrorHandler:
MsgBox Err.Number & " - " & Err.Description
MsgBox "D1J was unable to connect to the database", vbExclamation, "SOLOS - D1J"
InitializeConnection = False
End Function
Private Sub cmdCancel_Click()
CurrentDb.Close
Quit
End Sub
Private Sub cmdOk_Click()
Screen.MousePointer = 11
If ValidateInput() Then
If InitializeConnection() Then
DoCmd.Close acForm, "frmLogin"
End If
End If
Screen.MousePointer = 1
End Sub

Private Sub Form_Activate()
txtUsername.SetFocus
End Sub



 
DB upgrade from 10g to 11g
You probably should upgrade your ODBC client too ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
using oracle client 11g..but still getting the same error...
 
PHV, are you suggesting that there is a problem with the connection string? It looks like a legit EZConnect string to me.

I'd go along with PHV's earlier comment concerning ODBC client version. There are several versions of the 11g ODBC client around. Are you on 11.2 or later?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top