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

MySQL Relink Table VBA

Status
Not open for further replies.

humpydumpy2000

IS-IT--Management
Aug 18, 2016
30
PH
Hi all,


I have this problem regarding relinking mysql server access does not remember the connection and keeps on popping up asking for authentication


CnnString = "ODBC;DRIVER=MySQL ODBC 5.3 ANSI Driver;DATABASE="db_production";OPTION=2048;PORT=3306;SERVER=" 192.168.137.0.1";UID="root";PWD=;Connect Timeout=45; Command Timeout=90;"
Set tdf = CurrentDb.CreateTableDef("tbllogo")
tdf.Connect = CnnString
tdf.SourceTableName = "tbllogo"
CurrentDb.TableDefs.Append tdf
Set tdf = Nothing


any thoughts?
thanks in advance
 
I'm not familiar with connecting to mysql but I would expect your code should remove a lot of the double-quotes:
Code:
CnnString = "ODBC;DRIVER=MySQL ODBC 5.3 ANSI Driver;DATABASE=db_production;OPTION=2048;PORT=3306;" & _
    "SERVER=192.168.137.0.1;UID=root;PWD=;Connect Timeout=45;Command Timeout=90;"
You are not providing a PWD.

Duane
Hook'D on Access
MS Access MVP
 
MYSQL server does not have a password, it looks like the connection has not been saved and remembered by access
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top