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 14 of 14
  1. #1
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry ADODB.Connection.1 error '80004005'

    ADODB.Connection.1 error '80004005'

    SQLState: IM002
    Native Error Code: 0
    [INTERSOLV][ODBC lib] Data source name not found and no default driver specified


    changed.asp, line 8


    here are lines 1-10

    PHP Code:
    <%
    closed 0
    if closed 0 Then
    '///////////////////////////////////////////////////////////////////////////////////
    '
    connection string

    Set MyConn
    =Server.CreateObject("ADODB.Connection")
    MyConn.Open "getdata" 
    can someone PLEASE help me

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to specify the driver and the database after you create ADODB object and before you open it. If you use Access you can use
    Code:
    Set conn = Server.CreateObject("adodb.connection")
    sConn = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source= " & Server.MapPath("FILE NAME")
    conn. Open sConn
    Bostjan

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    same error different line it is now saying

    ADODB.Connection.1 error '80004005'

    SQLState: IM002
    Native Error Code: 0
    [INTERSOLV][ODBC lib] Data source name not found and no default driver specified
    changed.asp, line 9


    PHP Code:
    Set conn Server.CreateObject("adodb.connection")
    sConn "Provider = Microsoft.Jet.OLEDB.4.0; Data Source= " Server.MapPath("finalchaos.mdb")
    connOpen sConn 
    conn. Open sConn is line 9

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is your database in the same directory as the ASP page? Otherwise you must specify the path too.

    If your page is in root folder and database in "db" folder you shoud specify path like "db/finalchaos.mdb"

    Bostjan

  • #5
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the db is right in the root directry!!!! please help me

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Then try this to open the database
    Code:
    sConn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("finalchaos.mdb")
    Bostjan

  • #7
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You may also check out this page - it deals with db errors
    http://www.aspfaq.com/2009

    Bostjan

  • #8
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok now i get this
    i have

    PHP Code:
    sConn "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" Server.MapPath("finalchaos.mdb"
        
    set MyConn Server.CreateObject("ADODB.Connection"
    in changed.asp
    then i get

    ADODB.Connection.1 error '800a0e78'
    Invalid operation on closed object
    /index.asp, line 10
    on index.asp
    this is what line 10 is on index

    PHP Code:
    SQL "SELECT ID FROM Members ORDER BY ID DESC"
    Set RS MyConn.Execute(SQL
    im executing it on line 10 whats wrong?????
    Last edited by The69Pimp; 01-18-2003 at 12:54 PM.

  • #9
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You forgot
    Code:
    MyConn.open sConn
    Bostjan

  • #10
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    now i get

    ADODB.Connection.1 error '800a0bb9'

    The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.

    changed.asp, line 9
    this is 7,8,9

    PHP Code:
    sConn "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" Server.MapPath("finalchaos.mdb"
    Set Myconn Server.CreateObject("adodb.connection")
    MyConn.open sConn 
    Last edited by The69Pimp; 01-18-2003 at 01:19 PM.

  • #11
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Two questions:
    Does your ISP support MS Access?
    Is your MDB file valid Access file?

    Bostjan

  • #12
    New Coder
    Join Date
    Jun 2002
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes and yes
    i made this game a few months ago, had it running then lost my isp and took it down, just got it back and now i cant run it because i cant get this to work

  • #13
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If it woked I'd bet there is something wrong on the server of your ISP.

    Bostjan

  • #14
    New Coder
    Join Date
    Sep 2002
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OLEDB is looking for a Provider not a driver.
    Try this connection. Also if you look I am specifically telling Server.MapPath() to look in ght root directory by adding the "/" to the filename.


    PHP Code:
        Dim oConn,oRs,sSQL
        Set oConn 
    Server.CreateObject("ADODB.CONNECTION")
        
    set oRs Server.CreateObject("ADODB.RECORDSET")
        
    oConn.ConnectionString "Provider=Microsoft.Jet.OleDb.4.0; Data Source=" Server.MapPath("/finalchaos.mdb")
        
    oConn.Open
        sSQL 
    "SELECT ID FROM Members ORDER BY ID DESC"
        
    oRs.Open sSQL,oConn,2,1

        
    Do While Not oRs.EOF
            Response
    .Write(oRs.Fields("ID").value "<BR>")
            
    oRs.MoveNext
        Loop 
    Hope this helps
    a credit card for a newbie from Amex: The Amex Blue card would like to start developing a credit history.


  •  

    Posting Permissions

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