Results 1 to 2 of 2

Thread: Provider (0x80004005)

  1. #1

    Thread Starter
    Addicted Member Guru's Avatar
    Join Date
    May 2000
    Location
    sulking in the cupboard under the stairs
    Posts
    237

    Provider (0x80004005)

    Page loads ok but if I refresh it I get the following error:
    Provider (0x80004005)
    Unspecified error
    The error is in the conn.open line
    set Conn = Server.CreateObject("ADODB.Connection")

    Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("\abc\abc.mdb"))
    WHY?


    access 97 db
    running on IIS on XP



    Thanks
    Another light-hearted post from Guru

  2. #2
    Fanatic Member Mr.No's Avatar
    Join Date
    Sep 2002
    Location
    Mauritius
    Posts
    651

    Re: Provider (0x80004005)

    Since you're using ADO I would use my connection as follows:

    VB Code:
    1. set Conn = Server.CreateObject("ADODB.Connection")
    2.  lcStrDB = "c:\db\abc.mdb"
    3.  set Conn = Server.CreateObject("ADODB.Connection")
    4.  
    5. Conn.Open("Provider=Microsoft.OLEDB.Jet.4.0;Data Source=" & lcStrDB ";User ID=admin;password=;")

    I'm not sure if the statement server.MapPath("\abc\abc.mdb")) is correct. I think Server.MapPath returns the folder location of the file only so you'll have to explicitly concatenate the mdb name to the return value.
    Using VB.NET 2003/.NET 1.1/C# 2.0
    http://del.icio.us/rajoo
    Blow your mind, smoke gunpowder
    Ashes to ashes, dust to dust
    If God won't have you, the devil will. - Author unknown
    Don't follow me, I'm lost too ...

Posting Permissions

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



Click Here to Expand Forum to Full Width