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!

DSN-less connection string for mySQL using VB?

Status
Not open for further replies.

UBfoolin

Programmer
Nov 29, 2001
32
US
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?

Mucho thanks,
DD
 
I found this at:
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;"

This also from :
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top