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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Connection 1

Status
Not open for further replies.

Irish1957

Programmer
Sep 16, 2002
46
AU
I am using MySQL as a backend to an Access 2003 frontend. I have recently had to update one of the tables to add several fields. Previously when linking to the backend tables the connect string has been stored in MSysObjects as

"DNS=myodbcconnectionname;Server=myserver;UID=myuid;DATABASE=mydatabase;POET3306;SSLVERIFY="

suddenly for no apperrant reason it has decided that the connection string is now

"DNS=myodbcconnectionname;" while this works on my development machine it is not functioning when I transfer the front end to different machines.

I need to get back to the original saved string, any help would be much appreciated
 
It is possible to update the connection like so:

Code:
Set db = CurrentDb
For Each tdf In db.TableDefs
    If tdf.Connect = "DNS=myodbcconnectionname;" Then
       tdf.Connect = "DNS=myodbcconnectionname;Server=myserver;UID=myuid;DATABASE=mydatabase;POET3306;SSLVERIFY="
       tdf.RefreshLink
       'Debug.Print tdf.Name
    End If
Next

 
Thank-you, this solved the problem.

Though I found that you needed to add ODBC; to the front of the connection string displayed in the MSysObjects table to get it to work.

I would like to identify the base cause of the miss-save.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top