Need help connecting to a MySQL database with ASP.
The code that the new hosting company said to use looks like this:
================================
<% Dim ConnectionString ConnectionString="DRIVER={MySQL ODBC 3.51 Driver}; SERVER=acct.ipowermysql.com; PORT=3306;" &_ "DATABASE=dbname; USER=username; PASSWORD=*pass*; OPTION=3;" %>
================================
The original code from the site I'm moving looks like this:
================================
'local
Const SITE_URL = "http://url.com/"
Const ROOT_FOLDER = "/"
Const BASE_URL = "/"
Const MAIL_SERVER = ""
Const VERISIGN_URL = ""
Const SITE_SSL = "http://mmd-3/"
Set Conn = Server.CreateObject("ADODB.Connection")
'Conn.mode=3
'Conn.open "DSN=dsn1"
'Conn.open "DSN=dsn2"
'Conn.Open "Driver={SQL Server};Server=999.999.999.999;Database=dbname;Uid =user;Pwd=pass;"
'Conn.Open "Driver={SQLServer};Server=999.999.999.999;Databas e=dbname;Trusted_Connection=yes;"
'Conn.Open "Driver={SQL Server};Server=999.999.999.999;Uid=user;Pwd=pass;D atabase=dbname;"
'Conn.Open "Driver={mySQL};Server=mysql.serverurl.com;Databas e=dbname1;UID=user1;PASSWORD=pass1"
Conn.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=h41mysql1.serverurl.net;PORT=3306;D ATABASE=dbname;USER=user;PASSWORD='pass';OPTION=0; "
REM:///////////
'-------------------------------------------
'Open the DB Connection
'-------------------------------------------
function fnDBOpen()
Set Conn = Server.CreateObject("ADODB.Connection")
'Conn.open "DSN=dsn1"
'Conn.open "DSN=dsn2"
'Conn.Open "Driver={SQL Server};Server=999.999.999.999;Uid=user;Pwd=pass;D atabase=dbname;"
Conn.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=h41mysql1.serverurl.net;PORT=3306;D ATABASE=dbname;USER=user;PASSWORD='pass';OPTION=0; "
end function
================================
I'm an HTML guy, not an ASP guy, and never used a MySQL database before either. So, I'm in over my head on this one. If it helps, I'll share the ASP code that I edited to connect to the database (that doesn't work).
Any help would be most appreciated!
Mark
yes, I am....
yes, I am....