Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002

    Question Unanswered: Need help whit a connect string to mysql

    Well my probs is that I have installed mysql and its work but now to problem I coding in asp and need a connection to the mysql

    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
    Set dbcon = Server.CreateObject("ADODB.Connection")
    Set rs=Server.CreateObject("ADODB.recordset") strConnect

    This you use for access databas but how do I do one for mysql ? someone have a answere pls answere

  2. #2
    Join Date
    Jul 2002
    Download and install MyODBC (link from and follow the instructions. You can't connect to MySQL using OLEDB or any of the native providers. Install it, set up a DSN and do it that way.

    edit: example from an ASP page connecting to MySQL
    	Set cn = Server.CreateObject("ADODB.Connection")
    	Set rs = Server.CreateObject("ADODB.RecordSet")
    	' option=16384 forces MyODBC to cast BIGINT to INT for count(*) statements - ADO can't handle BIGINTs
    	cn.Open "Driver={mySQL}; Server=; Port=3306; Option=16384; Socket=; Stmt=; Database=databasename; Uid=username; Pwd=yourpassword;"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts