PDA

View Full Version : ADO/VB and mySQL


wen_dell8
05-07-2007, 10:55 AM
is there anybody knows how to connect the ADO to mySQL Server in VB, I already installed the ODBC for mySQL on my PC and i dont know the connection string how to connect it. thank you :o

Daemonspyre
05-11-2007, 02:41 PM
Connection strings are everywhere on the internet.

If you set up a DSN, you can connect that way, or you can use the standard connection strings.

Here's a good site for connection strings: http://connectionstrings.com/

Driver={MySQL ODBC 3.51 Driver};Server=data.domain.com;Port=3306;Database=myDataBase;User=myUsername;Password=myPassword;Opt ion=3;


For DSN's (set this up using Win's ODBC Connection Manager in Admin Tools > ODBC...), use

<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=<yourDSNname>"
%>