Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    asp mysql connection error

    Hi Everyone
    I'm trying to connect to mysql from an asp page and I get the following error

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    [MySQL][ODBC 3.51 Driver]Access denied for user: 'user_id@%' to database 'db_name'

    /html/odbc_test2.asp, line 18

    if anyone can help me understand what is causing this error I would greatly appreciate it as I have gone over it again and again and I just don't know what is causing this, my user id and password are correct.
    The asp code is:
    Code:
    <%  @LANGUAGE = VBScript %>
    <% Option Explicit %>
    <% 
    Dim sConnection, objConn , objRS 
    
    'sConnection = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=*******;PORT=3306;DATABASE=********; USER=********;PASSWORD=********;OPTION=3;"); 
    
    
        sConnection = "Driver={MySQL ODBC 3.51 Driver};" & _ 
            "Server=***********;" & _ 
            "Database=*******;" & _ 
            "Uid=********;" & _ 
            "Pwd=*******;" 
    
    
    Set objConn = Server.CreateObject("ADODB.Connection") 
    
    objConn.Open(sConnection) 
    
    Set objRS = objConn.Execute("SELECT ProductName, Grade FROM Comics")
    
    
    While Not objRS.EOF
    Response.Write objRS.Fields("ProductName") & ", " & objRS.Fields("Grade") & "<br>"
    'Response.Write & " "
    objRS.MoveNext
    Wend 
    
    objRS.Close
    Set objRS = Nothing
    objConn.Close
    Set objConn = Nothing
    %>
    No matter how many times you save the world, it always manages to get back in jeopardy again. Sometimes I just want it to stay saved! You know, for a little bit? I feel like the maid; I just cleaned up this mess! Can we keep it clean for just ten minutes!
    _________________________
    www.themazecomicstore.com
    _________________________

  • #2
    New Coder
    Join Date
    Aug 2005
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just figured it out, Uppercase mistake on table name!
    No matter how many times you save the world, it always manages to get back in jeopardy again. Sometimes I just want it to stay saved! You know, for a little bit? I feel like the maid; I just cleaned up this mess! Can we keep it clean for just ten minutes!
    _________________________
    www.themazecomicstore.com
    _________________________


  •  

    Posting Permissions

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