Problem with ASP connection to MySQL

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Problem with ASP connection to MySQL

    I'm using the following code to try to connect to an existing MySQL database
    that I can connect to with MySQL-Front. But I'm getting a 500 error.
    <%
    Set oConn = Server.CreateObject("ADODB.Connection")
    oConn.open "Driver={mySQL};" & _
    "Server=00.00.00.00;" & _
    "Port=3306;" & _
    "Option=131072;" & _
    "Stmt=;" & _
    "Database=dbName;" & _
    "Uid=UserName;" & _
    "Pwd=Password"
    oConn.close
    %>
    Is the problem with the IP address? Do I need to supply the Server reference
    in some other format? The Database name, userid and password although not
    correct in this example are the same ones used in MySQL-front.
    What is the Option= statement


    Dwalker Guest

  2. Similar Questions and Discussions

    1. #40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
      From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ...
    2. Error 2013 problem, Lost connection to MySQL during query. (InnoDB)
      Hello, I get an error: "Error 2013 problem, Lost connection to MySQL during query" and the MySQL service stops when I run an SQL statement:...
    3. connection problem MySQL - php from dreamweaver
      Can anybody please help me ? I have set up a remote MySQL database ( on windows system), and have defined the remote testing server and filled...
    4. MySQL CF7 connection problem
      I recently installed MySQL 4.1 and CF7, but I'm having trouble with the driver connection. I'm trying to use MySQL's connector J v. 3.0.17 but I...
    5. MySql database connection problem
      Hi Everyone, I've just installed ColdFusion MX 6.1 on Red Hat (it's also runing Plesk to manage all my domains. I don't konw if that throws a...
  3. #2

    Default Re: Problem with ASP connection to MySQL


    "Dwalker" <dl_walker@hotmail.com> wrote in message
    news:uNN9b.1826$sO4.1508@bignews1.bellsouth.net...
    > I'm using the following code to try to connect to an existing MySQL
    database
    > that I can connect to with MySQL-Front. But I'm getting a 500 error.
    First thing to do is find out what the error really is. See here.
    [url]http://www.aspfaq.com/2109[/url]


    > <%
    > Set oConn = Server.CreateObject("ADODB.Connection")
    > oConn.open "Driver={mySQL};" & _
    > "Server=00.00.00.00;" & _
    > "Port=3306;" & _
    > "Option=131072;" & _
    > "Stmt=;" & _
    > "Database=dbName;" & _
    > "Uid=UserName;" & _
    > "Pwd=Password"
    > oConn.close
    > %>
    > Is the problem with the IP address?
    That's probably a good guess. Take a look at the sample connection strings
    for MySQL here. [url]http://www.connectionstrings.com/[/url] The one you'd want to
    try first is the OLE DB one.

    Ray at home



    Ray at home Guest

  4. #3

    Default Re: Problem with ASP connection to MySQL

    Thanks. Here's the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [Microsoft][ODBC Driver Manager] Data source name not found and no default
    driver specified

    /testmysql.asp, line 4

    Line 4 is: oConn.open "Driver={mySQL};" & _


    "Ray at home" <myfirstname at lane 34 . komm> wrote in message
    news:%23%23EiNQMfDHA.128@tk2msftngp13.phx.gbl...
    >
    > "Dwalker" <dl_walker@hotmail.com> wrote in message
    > news:uNN9b.1826$sO4.1508@bignews1.bellsouth.net...
    > > I'm using the following code to try to connect to an existing MySQL
    > database
    > > that I can connect to with MySQL-Front. But I'm getting a 500 error.
    >
    > First thing to do is find out what the error really is. See here.
    > [url]http://www.aspfaq.com/2109[/url]
    >
    >
    >
    > > <%
    > > Set oConn = Server.CreateObject("ADODB.Connection")
    > > oConn.open "Driver={mySQL};" & _
    > > "Server=00.00.00.00;" & _
    > > "Port=3306;" & _
    > > "Option=131072;" & _
    > > "Stmt=;" & _
    > > "Database=dbName;" & _
    > > "Uid=UserName;" & _
    > > "Pwd=Password"
    > > oConn.close
    > > %>
    > > Is the problem with the IP address?
    >
    > That's probably a good guess. Take a look at the sample connection
    strings
    > for MySQL here. [url]http://www.connectionstrings.com/[/url] The one you'd want to
    > try first is the OLE DB one.
    >
    > Ray at home
    >
    >
    >

    Dwalker Guest

  5. #4

    Default Re: Problem with ASP connection to MySQL

    Did you install MySQL drivers?

    Ray at work

    "Dwalker" <dl_walker@hotmail.com> wrote in message
    news:o%3ab.6086$1u6.3101@bignews4.bellsouth.net...
    > Thanks. Here's the error:
    >
    > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    >
    > [Microsoft][ODBC Driver Manager] Data source name not found and no default
    > driver specified
    >
    > /testmysql.asp, line 4
    >
    > Line 4 is: oConn.open "Driver={mySQL};" & _

    Ray at Guest

  6. #5

    Default Re: Problem with ASP connection to MySQL

    I thought this might be the problem. The MySQL database is on the hosting
    company's server. I'll have to contact them and ask them if they'll install
    it. Any other considerations?

    "Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
    news:O6TfQDWfDHA.560@tk2msftngp13.phx.gbl...
    > Did you install MySQL drivers?
    >
    > Ray at work
    >
    > "Dwalker" <dl_walker@hotmail.com> wrote in message
    > news:o%3ab.6086$1u6.3101@bignews4.bellsouth.net...
    > > Thanks. Here's the error:
    > >
    > > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    > >
    > > [Microsoft][ODBC Driver Manager] Data source name not found and no
    default
    > > driver specified
    > >
    > > /testmysql.asp, line 4
    > >
    > > Line 4 is: oConn.open "Driver={mySQL};" & _
    >
    >

    Dwalker Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139