Hi Experts (access 2003)
Shot in the dark....
I have the following function to set my SQL connection strings to the following instant...is the code incomplete or do i need to tell it (vba code0 that it's a new connection....totally confused...
If i am talking rubbish please step in.....and correct me...
I am trying to connect to SQL and keep on getting a ODBC connection failure error msg...
whats could be wrong....
Public Function GetQueryLinks()
On Error GoTo Err_GetQueryLinks
Dim qdf As DAO.QueryDef
Dim StrConn As String
StrConn = "ODBC;Driver=SQL Server;UID=MyUID;PWD=MyPass;Server=SEEEPB4SBT45646.global.Hire.com;Port=43533;Database= Apples_Ornages;"
For Each qdf In CurrentDb.QueryDefs
If qdf.Connect <> "" Then
qdf.Connect = StrConn
Set qdf = Nothing
MsgBox Err.Number & " (" & Err.Description & ") in procedure GetQueryLinks of Module basTableLinks"