Link to home
Start Free TrialLog in
Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia

asked on

Sql Back end connection error

Hi All;


I have just tried to run my application with SQl Server back end on a different machine with a different network, now I'm getting the error attached .I'm not too sure what it is I asked the IT Manager he assured me that he installed the correct ODBC drivers. Could it be the code below not correctly done:

Option Compare Database
Option Explicit

Function ShowConnectInfo()
  Dim dbs As DAO.Database
  Dim tdf As DAO.TableDef
  Set dbs = CurrentDb()
For Each tdf In dbs.TableDefs
    If (tdf.Connect <> vbNullString) Then
        tdf.Connect = "ODBC;DRIVER={sql server};DATABASE=MDCAccounting;SERVER=USER\SQLEXPRESS;Trusted_Connection=Yes;"
Debug.Print tdf.Connect
        tdf.RefreshLink
    End If

 Next tdf

Set tdf = Nothing
  Set dbs = Nothing
End Function

Regards

Chris
Sql-Server-error.docx
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial