Due to the number of databases we have, I need a DSN-less ADO connection string for Visual Basic. Has anyone done this and can you post the connection string?
For a local server
oConn.Open "Driver={mySQL};" & _
"Server=MyServerName;" & _
"Option=16834;" & _
"Database=mydb;"
For a remote server
oConn.Open "Driver={mySQL};" & _
"Server=db1.database.com;" & _
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword;"
:
Visual Basic
To be able to update a table, you must define a primary key for the table. Visual Basic with ADO can't handle big integers. This means that some queries like "SHOW PROCESSLIST" will not work properly. The fix is to set add the option OPTION=16834 in the ODBC connect string or set the "Change BIGINT columns to INT" option in the MyODBC connect screen. You may also want to set the "Return matching rows option". ______________________________________________________________________
Perfection in engineering does not happen when there is nothing more to add.
Rather it happens when there is nothing more to take away.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.