Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Microsoft OLE DB

  1. #1
    Join Date
    Jun 2003
    Posts
    456
    Rep Power
    0

    Default Microsoft OLE DB

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    This is the error I am getting when I am trying to setup an IIS server

  2. #2
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Microsoft OLE DB

    Trying to setup an IIS server? What part of the setup are you at?

    I usually get that error in my asp scripts when my scripts try to execute an SQL query, but no connection to the database was setup. So I created an OLE DB connection to my database.

    I don't know about that error occuring during setup of an IIS server. But it happens when your script is missing the connection to a database but is trying to execute an SQL query.
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  3. #3
    Join Date
    Sep 2004
    Posts
    53
    Rep Power
    0

    Default Re: Microsoft OLE DB

    Are you sure the error occurs while setting up IIS.
    There seems to be a problem with the connection string. Post it so I can have a look

  4. #4
    Join Date
    Jun 2003
    Posts
    456
    Rep Power
    0

    Default Re: Microsoft OLE DB

    it sorry this happen after I have setup ISS. How do I setup the script Connection to the database?

  5. #5
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Microsoft OLE DB

    You would setup the connection in your asp or ASP.NET scripts. This page gives you a list of different connections you can use to connect to a database: http://www.able-consulting.com/MDAC/..._Providers.htm

    Here's one you could use:
    Code:
    set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=c:\somepath\myDb.mdb;" & _ 
               "User Id=admin;" & _
               "Password="
    You would need to change the code in red to the path to your MS Access database.

    If your database doesn't have a username or password, you can remove the User Id and Password from the connection:
    Code:
    set oConn = Server.CreateObject("ADODB.Connection")
    oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
               "Data Source=c:\somepath\myDb.mdb;"
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  6. #6
    Join Date
    Jun 2003
    Posts
    456
    Rep Power
    0

    Default Re: Microsoft OLE DB

    Thats for the code Arch_Angel but is seem like all my files are missing that is there any way I can getting this code in without having to update each page?

  7. #7
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Microsoft OLE DB

    You can store the connection in an asp file called "config.asp" or "connection.asp" and then put an include file at the top of your asp files like so:
    Code:
    <!--#include file="config.asp"-->
    Unfortunetly you still will have to update each asp file that requires a connection to your database.
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  8. #8
    Join Date
    Jun 2003
    Posts
    456
    Rep Power
    0

    Default Re: Microsoft OLE DB

    New Error message

    Microsoft JET Database Engine (0x80040E21)
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done

    How do I solve this one.

  9. #9
    Join Date
    Apr 2003
    Posts
    13,270
    Rep Power
    35

    Default Re: Microsoft OLE DB

    What is the sql query that it is trying to execute? It should give you line numbers to let you know where in your code is giving the error.

    Also, you want to give a background on how you came to this position?
    Are you running asp scripts that you coded or somebody else coded?
    Are you new to ASP and VBScript?

    You said you were installing IIS. Did you reinstall IIS or just installing it for the first time?
    "The best software is the one that fits your needs." - A_A

    Virus free since: date unknown
    Anti-virus free since: August 2008

  10. #10
    Join Date
    Jun 2003
    Posts
    456
    Rep Power
    0

    Default Re: Microsoft OLE DB

    Firstly I am NEW to ASP and VBscript
    This is actually soneones coding and they are not here anymore so Everything was working fine until the information was moved from the server to a local machine. So i had to reinstall IIS and it seem like I have to link every page to a particular Datasource.

    The Codes you gave me above I use it and now after those code it's given me this new error on every page.

    Microsoft JET Database Engine (0x80040E21)
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    /inspections/Search_Screen_Body.asp, line 102

    this is what is on that line
    objrst.open objcmd

Posting Permissions

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