[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] RAQ4i and MySQL



Bob:

The only way that we have found so far to create a DSN-less connection is as
follows:

<%
strConnection =
"Driver={MySQL};Server=localhost;Database=your_database;UID=your_database_us
ername;PWD=your_password"
strUser = "your_database_username"
strPassword = "your_password"
intConnectionTimeout = 30
intCommandTimeout = 45

Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout = intConnectionTimeout
conn.CommandTimeout = intCommandTimeout
conn.Open strConnection, strUser, strPassword
%>


I'm not sure if the strUser and strPassword variables in the conn.Open call
are completely necessary, but we've used this code on several sites so far
(running ChilisoftASP and MySQL on the RAQ4) and it seems to work fine.

HTH.

Mark E. Gilbert
Granite Solutions
mgilbert@xxxxxxxxx
Ph: 616-324-8231x24
Fax: 616-324-5240



> -----Original Message-----
> From: Bob Coomes [mailto:bcoomes@xxxxxxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, January 25, 2001 11:32 AM
> To: cobalt-developers@xxxxxxxxxxxxxxx
> Subject: [cobalt-developers] RAQ4i and MySQL
> 
> 
> I'm currently testing a RAQ4i with MySQL installed.  Problem 
> is that I don't
> know how to connect to the db using ASP (vbscript).
> 
> On my NT server using an Access db, I use the following for a dsnless
> connection:
> 
> set objConn=server.createobject("ADODB.connection")
> strConn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=data.mdb;User
> Id=admin;Password=;"
> objConn.Open strConn
> 
> How would I go about doing the same thing on a RAQ with 
> MySQL?  I'm trying
> to avoid using a dsn, but if that's the only way, please send 
> instructions
> how to go about it that way.
> 
> 
> Thanks if advance for any help,
> 
> Bob Coomes
> bcoomes@xxxxxxxxx
> 
> 
> 
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers
>