Re: mySQL Connection String

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Wayne... (wayne_at_secretwebdesign.com)
Date: 06/21/04


Date: Mon, 21 Jun 2004 21:27:03 +0100


"IPT" <chency@streamyx.com> wrote in message
news:efxTr%236VEHA.2972@TK2MSFTNGP11.phx.gbl...
> I use mySQL but can connect.
>
> Here is my code:
> Set myconn = Server.CreateObject("ADODB.Connection")
> myconn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
> "DefaultDir=c:\inetpub\dbase\;" & _
> "Dbf=c:\inetpub\dbase\mydb.db;" & _
> "Uid=dba;" & _
> "Pwd=sql;" & _
> "Dsn="""""
> Set rs = Server.CreateObject("ADODB.Recordset")
 the connection string I use [somewhat flakey!] but you might have some luck
with it is:

<%
strConnection = "driver={MySQL};server=localhost;uid=username;"
strConnection = strConnection & "pwd=password;database=databasename"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnection
%>
hope that helps

Wayne...



Relevant Pages

  • Re: [PHP] CMS-Blog system
    ... I don't know much about wordpress, but I have tryed enough of open-source CMS to say that they are based on messy solutions + it won't be free blog system, so I don't think using this free system would be fair. ... If they didn't want you to use it to build paid-for services that would be restricted by the license, ... If you have a moral objection to using open source software to run a paid-for service, be sure to avoid Apache, MySQL and Linux too!! ... Not sure I see the relevance of that link, but if you think praying will help I'll repeat my "good luck". ...
    (php.general)
  • Re: List MySQL Databases?
    ... Don't use DSN in connection string, cause you have to specify database then. ... Joe ... > but I think that in MySQL there is none. ...
    (borland.public.delphi.database.ado)
  • Re: Is it possible to use TADOConnection with MySQL ADO.NET Connector?
    ... But my problem is not in the correct form of the connection string. ... MySQL ADO.NET Connector and the TADOConnection component in BCB2006 ... To connect to MySQL using ADO you'll need either to use the ODBC layer ... and MyODBC driver, or find some OLE DB driver which works with MySQL. ...
    (borland.public.delphi.database.ado)
  • RE: connection string problem
    ... I'd tryed your sugestion with no luck, ... >> I had been trying to find out how can i connect my ppc to my sql server over ... >> error from my device saying that is an error in my connection string in the ...
    (microsoft.public.pocketpc.developer)
  • Re: mysql multiple statement execution
    ... an odbc connection string. ... i don't use the built-in mysql or odbc functions to prepare/execute queries...i create a com ado object...but that's another story. ... is there a param on the connection string that could be used? ... LOCK TABLES webPages WRITE; INSERT INTO webPages ( ...
    (alt.php)