Error while using OLEDB (Jet) for Access within ASP

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

  1. #1

    Default Error while using OLEDB (Jet) for Access within ASP

    Hi everbody:

    I am getting an error (message to follow) when using the following
    code within ASP:

    cst= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    Server.MapPath(".") & "\shopping500.mdb;" & _
    "User Id=admin;" & _
    "Password="


    The error message is:

    The page cannot be displayed
    There is a problem with the page you are trying to reach and it cannot be
    displayed.

    ----------------------------------------------------------------------------
    ----

    Please try the following:

    Click the Refresh button, or try again later.

    Open the localhost home page, and then look for links to the information you
    want.
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    ----------------------------------------------------------------------------
    ----

    Technical Information (for support personnel)

    Error Type:
    Microsoft JET Database Engine (0x80040E4D)
    Cannot start your application. The workgroup information file is missing or
    opened exclusively by another user.
    /wcg/games.asp, line 662


    Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

    Page:
    POST 18 bytes to /wcg/games.asp

    POST Data:
    seltourn=3&prov=AB

    Time:
    Tuesday, December 09, 2003, 5:58:14 PM


    More information:
    Microsoft Support


    Thanks
    Terry


    Terry Murray Guest

  2. Similar Questions and Discussions

    1. Medium Trust and oledb access
      Hi I am configuring a server for a shared hosting environment and want to lock down the server. I changed the trust level to medium but all MySQL...
    2. ASP --> OLEDB --> Access db ?
      On Wed, 3 Mar 2004 13:06:14 -0800, ChrisB <anonymous@discussions.microsoft.com> wrote: Don't use Access. :) Access requires the user to...
    3. Jet OleDB Unspecified Error
      I have a Windows 2000 server with the latest updates and patches from Microsoft (Service Pack 3). I have version 2.7 of the MDAC, and version 8.0...
    4. OLEDB and an Access Db with a password
      Hi All ISP has told me that I should be using OLEDB connections instead of ODBC to get better ASP > ADO > Access DB performance. After a visit...
    5. Error when trying to add an Access DB Record containing a Long Integer type field using OLEDB in ADO.Net
      Hi All, I am trying to add a record to a datatable that is connected to an Access database. I had no trouble with string and date fields, but...
  3. #2

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    > Server.MapPath(".") & "\shopping500.mdb;" & _

    What is this supposed to represent?

    Did you try

    Server.MapPath("shopping500.mdb")

    ?

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

  4. #3

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    I changed my code to try what you suggest and still receive the same error
    message.
    There seems to be some contention for database connections.

    Thanks
    Terry

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    news:%239VE4uqvDHA.1740@TK2MSFTNGP12.phx.gbl...
    > > Server.MapPath(".") & "\shopping500.mdb;" & _
    >
    > What is this supposed to represent?
    >
    > Did you try
    >
    > Server.MapPath("shopping500.mdb")
    >
    > ?
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    >
    >

    Terry Murray Guest

  5. #4

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:ZIsBb.18339$3Eb1.9449@news04.bloor.is.net.cab le.rogers.com...
    > Hi everbody:
    >
    > I am getting an error (message to follow) when using the
    following
    > code within ASP:
    >
    > cst= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > Server.MapPath(".") & "\shopping500.mdb;" & _
    > "User Id=admin;" & _
    > "Password="
    >
    >
    > The error message is:
    >
    > The page cannot be displayed
    > There is a problem with the page you are trying to reach and it cannot
    be
    > displayed.
    >
    > ----------------------------------------------------------------------
    ------
    > ----
    >
    > Please try the following:
    >
    > Click the Refresh button, or try again later.
    >
    > Open the localhost home page, and then look for links to the
    information you
    > want.
    > HTTP 500.100 - Internal Server Error - ASP error
    > Internet Information Services
    >
    > ----------------------------------------------------------------------
    ------
    > ----
    >
    > Technical Information (for support personnel)
    >
    > Error Type:
    > Microsoft JET Database Engine (0x80040E4D)
    > Cannot start your application. The workgroup information file is
    missing or
    > opened exclusively by another user.
    > /wcg/games.asp, line 662
    >
    >
    > Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    >
    > Page:
    > POST 18 bytes to /wcg/games.asp
    >
    > POST Data:
    > seltourn=3&prov=AB
    >
    > Time:
    > Tuesday, December 09, 2003, 5:58:14 PM
    >
    >
    > More information:
    > Microsoft Support
    >
    >
    > Thanks
    > Terry
    You need to specify the workgroup file in your connection string. Please
    see "If using a Workgroup (System Database)" here:
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]

    HTH-
    Chris Hohmann


    Chris Hohmann Guest

  6. #5

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    news:%239VE4uqvDHA.1740@TK2MSFTNGP12.phx.gbl...
    > > Server.MapPath(".") & "\shopping500.mdb;" & _
    >
    > What is this supposed to represent?
    >
    > Did you try
    >
    > Server.MapPath("shopping500.mdb")
    >
    > ?
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    "." represents current directory, so I think the two stamens are
    equivalent (except for the semicolon of course).


    Chris Hohmann Guest

  7. #6

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    > "." represents current directory, so I think the two stamens are
    > equivalent (except for the semicolon of course).
    Well, the question was more rhetorical. Now the serious question: why do
    people insist on discombobulating their code with all this extra stuff?

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

  8. #7

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Chris Hohmann" <nospam@thankyou.com> wrote in message
    news:%23FAji6qvDHA.2440@TK2MSFTNGP12.phx.gbl...
    > "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    > news:%239VE4uqvDHA.1740@TK2MSFTNGP12.phx.gbl...
    > > > Server.MapPath(".") & "\shopping500.mdb;" & _
    > >
    > > What is this supposed to represent?
    > >
    > > Did you try
    > >
    > > Server.MapPath("shopping500.mdb")
    > >
    > > ?
    > >
    > > --
    > > Aaron Bertrand
    > > SQL Server MVP
    > > [url]http://www.aspfaq.com/[/url]
    >
    > "." represents current directory, so I think the two stamens are
    > equivalent (except for the semicolon of course).
    stamens = statements. Spellchecker is great but Stupiditychecker would
    be better. ;-)


    Chris Hohmann Guest

  9. #8

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
    news:OEZu6ArvDHA.2352@TK2MSFTNGP09.phx.gbl...
    > > "." represents current directory, so I think the two stamens are
    > > equivalent (except for the semicolon of course).
    >
    > Well, the question was more rhetorical. Now the serious question: why
    do
    > people insist on discombobulating their code with all this extra
    stuff?
    >
    > --
    > Aaron Bertrand
    > SQL Server MVP
    > [url]http://www.aspfaq.com/[/url]
    Possibly the connection string was cut and paste from a resource like
    [url]http://www.able-consulting.com/ADO_Conn.htm[/url]. I know, that question was
    rhetorical too. ;-p

    -Chris


    Chris Hohmann Guest

  10. #9

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    I do not think I am using a workgroup (but I could be wrong). I am simply
    running Access 2002 from a notebook that has IIS installed on it. Can you
    provide me that link again. It seems to be dead.

    Thanks
    Terry

    "Chris Hohmann" <nospam@thankyou.com> wrote in message
    news:%23pbSz1qvDHA.2448@TK2MSFTNGP09.phx.gbl...
    > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > news:ZIsBb.18339$3Eb1.9449@news04.bloor.is.net.cab le.rogers.com...
    > > Hi everbody:
    > >
    > > I am getting an error (message to follow) when using the
    > following
    > > code within ASP:
    > >
    > > cst= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > Server.MapPath(".") & "\shopping500.mdb;" & _
    > > "User Id=admin;" & _
    > > "Password="
    > >
    > >
    > > The error message is:
    > >
    > > The page cannot be displayed
    > > There is a problem with the page you are trying to reach and it cannot
    > be
    > > displayed.
    > >
    > > ----------------------------------------------------------------------
    > ------
    > > ----
    > >
    > > Please try the following:
    > >
    > > Click the Refresh button, or try again later.
    > >
    > > Open the localhost home page, and then look for links to the
    > information you
    > > want.
    > > HTTP 500.100 - Internal Server Error - ASP error
    > > Internet Information Services
    > >
    > > ----------------------------------------------------------------------
    > ------
    > > ----
    > >
    > > Technical Information (for support personnel)
    > >
    > > Error Type:
    > > Microsoft JET Database Engine (0x80040E4D)
    > > Cannot start your application. The workgroup information file is
    > missing or
    > > opened exclusively by another user.
    > > /wcg/games.asp, line 662
    > >
    > >
    > > Browser Type:
    > > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    > >
    > > Page:
    > > POST 18 bytes to /wcg/games.asp
    > >
    > > POST Data:
    > > seltourn=3&prov=AB
    > >
    > > Time:
    > > Tuesday, December 09, 2003, 5:58:14 PM
    > >
    > >
    > > More information:
    > > Microsoft Support
    > >
    > >
    > > Thanks
    > > Terry
    >
    > You need to specify the workgroup file in your connection string. Please
    > see "If using a Workgroup (System Database)" here:
    >
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]
    >
    > HTH-
    > Chris Hohmann
    >
    >

    Terry Murray Guest

  11. #10

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:h0uBb.18642$3Eb1.10130@news04.bloor.is.net.ca ble.rogers.com...
    > "Chris Hohmann" <nospam@thankyou.com> wrote in message
    > news:%23pbSz1qvDHA.2448@TK2MSFTNGP09.phx.gbl...
    > > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > > news:ZIsBb.18339$3Eb1.9449@news04.bloor.is.net.cab le.rogers.com...
    > > > Hi everbody:
    > > >
    > > > I am getting an error (message to follow) when using the
    > > following
    > > > code within ASP:
    > > >
    > > > cst= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > > Server.MapPath(".") & "\shopping500.mdb;" & _
    > > > "User Id=admin;" & _
    > > > "Password="
    > > >
    > > >
    > > > The error message is:
    > > >
    > > > The page cannot be displayed
    > > > There is a problem with the page you are trying to reach and it
    cannot
    > > be
    > > > displayed.
    > > >
    > >
    > ----------------------------------------------------------------------
    > > ------
    > > > ----
    > > >
    > > > Please try the following:
    > > >
    > > > Click the Refresh button, or try again later.
    > > >
    > > > Open the localhost home page, and then look for links to the
    > > information you
    > > > want.
    > > > HTTP 500.100 - Internal Server Error - ASP error
    > > > Internet Information Services
    > > >
    > >
    > ----------------------------------------------------------------------
    > > ------
    > > > ----
    > > >
    > > > Technical Information (for support personnel)
    > > >
    > > > Error Type:
    > > > Microsoft JET Database Engine (0x80040E4D)
    > > > Cannot start your application. The workgroup information file is
    > > missing or
    > > > opened exclusively by another user.
    > > > /wcg/games.asp, line 662
    > > >
    > > >
    > > > Browser Type:
    > > > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    > > >
    > > > Page:
    > > > POST 18 bytes to /wcg/games.asp
    > > >
    > > > POST Data:
    > > > seltourn=3&prov=AB
    > > >
    > > > Time:
    > > > Tuesday, December 09, 2003, 5:58:14 PM
    > > >
    > > >
    > > > More information:
    > > > Microsoft Support
    > > >
    > > >
    > > > Thanks
    > > > Terry
    > >
    > > You need to specify the workgroup file in your connection string.
    Please
    > > see "If using a Workgroup (System Database)" here:
    > >
    >
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]
    > >
    > > HTH-
    > > Chris Hohmann
    > >
    > >
    > I do not think I am using a workgroup (but I could be wrong). I am
    simply
    > running Access 2002 from a notebook that has IIS installed on it. Can
    you
    > provide me that link again. It seems to be dead.
    >
    > Thanks
    > Terry
    >
    Here's the link again:
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]

    Aaron has also posted similar instructions on his site (look towards the
    very bottom of the article):
    [url]http://aspfaq.com/show.asp?id=2126[/url]

    Also, you can run the MS Access Workgroup Administrator to see to the
    workgroup to which you are currently joined. A shortcut to that utility
    should be located in your Office installation directory.

    HTH-
    Chris Hohmann


    Chris Hohmann Guest

  12. #11

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    Okay Chris. I have finally found out how to create the workgroup information
    file system file. I am not sure how to go about creating the username and
    password for it. I am rather new to this so excuse me for my lack of
    knowledge.

    Thanks again
    Terry

    "Chris Hohmann" <nospam@thankyou.com> wrote in message
    news:%235FcxirvDHA.2136@TK2MSFTNGP10.phx.gbl...
    > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > news:h0uBb.18642$3Eb1.10130@news04.bloor.is.net.ca ble.rogers.com...
    > > "Chris Hohmann" <nospam@thankyou.com> wrote in message
    > > news:%23pbSz1qvDHA.2448@TK2MSFTNGP09.phx.gbl...
    > > > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > > > news:ZIsBb.18339$3Eb1.9449@news04.bloor.is.net.cab le.rogers.com...
    > > > > Hi everbody:
    > > > >
    > > > > I am getting an error (message to follow) when using the
    > > > following
    > > > > code within ASP:
    > > > >
    > > > > cst= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    > > > > Server.MapPath(".") & "\shopping500.mdb;" & _
    > > > > "User Id=admin;" & _
    > > > > "Password="
    > > > >
    > > > >
    > > > > The error message is:
    > > > >
    > > > > The page cannot be displayed
    > > > > There is a problem with the page you are trying to reach and it
    > cannot
    > > > be
    > > > > displayed.
    > > > >
    > > >
    > > ----------------------------------------------------------------------
    > > > ------
    > > > > ----
    > > > >
    > > > > Please try the following:
    > > > >
    > > > > Click the Refresh button, or try again later.
    > > > >
    > > > > Open the localhost home page, and then look for links to the
    > > > information you
    > > > > want.
    > > > > HTTP 500.100 - Internal Server Error - ASP error
    > > > > Internet Information Services
    > > > >
    > > >
    > > ----------------------------------------------------------------------
    > > > ------
    > > > > ----
    > > > >
    > > > > Technical Information (for support personnel)
    > > > >
    > > > > Error Type:
    > > > > Microsoft JET Database Engine (0x80040E4D)
    > > > > Cannot start your application. The workgroup information file is
    > > > missing or
    > > > > opened exclusively by another user.
    > > > > /wcg/games.asp, line 662
    > > > >
    > > > >
    > > > > Browser Type:
    > > > > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    > > > >
    > > > > Page:
    > > > > POST 18 bytes to /wcg/games.asp
    > > > >
    > > > > POST Data:
    > > > > seltourn=3&prov=AB
    > > > >
    > > > > Time:
    > > > > Tuesday, December 09, 2003, 5:58:14 PM
    > > > >
    > > > >
    > > > > More information:
    > > > > Microsoft Support
    > > > >
    > > > >
    > > > > Thanks
    > > > > Terry
    > > >
    > > > You need to specify the workgroup file in your connection string.
    > Please
    > > > see "If using a Workgroup (System Database)" here:
    > > >
    > >
    >
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]
    > > >
    > > > HTH-
    > > > Chris Hohmann
    > > >
    > > >
    > > I do not think I am using a workgroup (but I could be wrong). I am
    > simply
    > > running Access 2002 from a notebook that has IIS installed on it. Can
    > you
    > > provide me that link again. It seems to be dead.
    > >
    > > Thanks
    > > Terry
    > >
    >
    > Here's the link again:
    >
    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]
    >
    > Aaron has also posted similar instructions on his site (look towards the
    > very bottom of the article):
    > [url]http://aspfaq.com/show.asp?id=2126[/url]
    >
    > Also, you can run the MS Access Workgroup Administrator to see to the
    > workgroup to which you are currently joined. A shortcut to that utility
    > should be located in your Office installation directory.
    >
    > HTH-
    > Chris Hohmann
    >
    >

    Terry Murray Guest

  13. #12

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    Terry Murray wrote:
    > Okay Chris. I have finally found out how to create the workgroup
    > information
    > file system file. I am not sure how to go about creating the username
    > and
    > password for it. I am rather new to this so excuse me for my lack of
    > knowledge.
    >
    Don't do this if you are not using workgroup security in this database!

    Something else is causing this error message!

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

  14. #13

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:pMuBb.18801$3Eb1.3353@news04.bloor.is.net.cab le.rogers.com...
    > Okay Chris. I have finally found out how to create the workgroup
    information
    > file system file. I am not sure how to go about creating the username
    and
    > password for it. I am rather new to this so excuse me for my lack of
    > knowledge.
    There was no need to create a new workgroup file. What was listed as the
    workgroup file before you created/joined the new one? That's the one the
    IUSR account cannot access. Are you able to open the database manually?
    Not a shortcut, but the actually mdb file.

    -Chris Hohmann

    P.S. Please post your responses below. It makes it easier to follow the
    thread of this conversation.


    Chris Hohmann Guest

  15. #14

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:pMuBb.18801$3Eb1.3353@news04.bloor.is.net.cab le.rogers.com...
    > Okay Chris. I have finally found out how to create the workgroup
    information
    > file system file. I am not sure how to go about creating the username
    and
    > password for it. I am rather new to this so excuse me for my lack of
    > knowledge.
    1. Please don't start new threads, or at the very least indicate that
    you have in the original thread. You neglected to mention that you are
    able to successfully connect the first time, but it fails on subsequent
    attempts. I had to glean that from your other post. Knowing this could
    have saved us both some time. As Bob points out, your problem is
    unrelated to the workgroup file. If I had to guess, I suspect you are
    opening the connection in exclusive mode. Are you setting the Mode
    property of the connection object to adModeShareExclusive anywhere? Can
    you show us some more code?

    2. Please post your responses below. It makes it easier to follow along
    in the thread.

    3. Please don't be offended. I genuinely would like to help. But to
    quote Jerry McGuire, "help me help you..."

    HTH
    -Chris Hohmann


    Chris Hohmann Guest

  16. #15

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    No, Chris, as far as I know I have not been setting the Mode property of
    the connection object to anything. Perhaps, there is a default that I am
    not aware of. I have since been able to locate the IUSR_Machinename and
    IWAM_Machinename accounts. After setting the permission properties of these
    accounts to "Modify" I then went back to trying to connect via a dsn and
    have been able to with no problems.
    I would still like to know how to connect the dsn-less way and would
    appreciate any other help you can provide me with.

    Perhaps you can show what the connection string and code for the mode that I
    open with should look like.

    Thanks in advance
    Terry

    "Chris Hohmann" <nospam@thankyou.com> wrote in message
    news:%23XpJfA1vDHA.2080@TK2MSFTNGP10.phx.gbl...
    > "Terry Murray" <tgmurray@rogers.com> wrote in message
    > news:pMuBb.18801$3Eb1.3353@news04.bloor.is.net.cab le.rogers.com...
    > > Okay Chris. I have finally found out how to create the workgroup
    > information
    > > file system file. I am not sure how to go about creating the username
    > and
    > > password for it. I am rather new to this so excuse me for my lack of
    > > knowledge.
    >
    > 1. Please don't start new threads, or at the very least indicate that
    > you have in the original thread. You neglected to mention that you are
    > able to successfully connect the first time, but it fails on subsequent
    > attempts. I had to glean that from your other post. Knowing this could
    > have saved us both some time. As Bob points out, your problem is
    > unrelated to the workgroup file. If I had to guess, I suspect you are
    > opening the connection in exclusive mode. Are you setting the Mode
    > property of the connection object to adModeShareExclusive anywhere? Can
    > you show us some more code?
    >
    > 2. Please post your responses below. It makes it easier to follow along
    > in the thread.
    >
    > 3. Please don't be offended. I genuinely would like to help. But to
    > quote Jerry McGuire, "help me help you..."
    >
    > HTH
    > -Chris Hohmann
    >
    >

    Terry Murray Guest

  17. #16

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    Terry Murray wrote:
    > No, Chris, as far as I know I have not been setting the Mode
    > property of the connection object to anything. Perhaps, there is a
    > default that I am not aware of. I have since been able to locate the
    > IUSR_Machinename and IWAM_Machinename accounts. After setting the
    > permission properties of these accounts to "Modify" I then went back
    > to trying to connect via a dsn and have been able to with no problems.
    > I would still like to know how to connect the dsn-less way and would
    > appreciate any other help you can provide me with.
    >
    Terry Murray also wrote (in the other thread):
    > Hi Bob. I have since been able to locate the IUSR_Machinename and
    > IWAM_Machinename accounts (thank you). After setting the permission
    > properties of these
    > accounts to "Modify" I was not successful. What happens is that I
    > can hit the database once but after any other attempts I get the
    > error message.
    I'm confused. In your reply to Chris, you said this:
    After setting the permission properties of these
    accounts to "Modify" I then went back to trying to connect via a dsn and
    have been able to with no problems.

    Let's see, which reply came later ... hmm, it seems that this is the later
    message. So your problem is not solved?
    > As Chris, pointed out in another post, I may have the
    > mode property for the connection object set to the wrong value.
    > I went back to trying to connect via a dsn and have been able to
    > with no problems. Perhaps, there is a default that I am
    > not aware of the mode property.
    > .
    > I would still like to know how to connect the dsn-less way and would
    > appreciate any other help you can provide me with.
    >
    > Perhaps you can show what the connection string and code for the mode
    > that I open with should look like.
    >
    The default mode is shared. It should not have to be set explicitly. I
    heartily endorse getting rid of the dsn. Here is a sample connection string:

    sConnect = "Provider=Microsoft.Jet.4.0.OLEDB;" & _
    "Data Source=p:\ath\to\database.mdb"

    Notice that you have to provide a file system path to the database, just as
    you have to do when creating a dsn. In fact, if you open your current dsn,
    you should be able to copy and paste the path from it. Also notice that I do
    not bother supplying a User ID or blank password.

    The Mode property controls how a connection is established. I have never had
    to set it.
    [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdapro04_4.asp[/url]

    Take a look at this as well:
    [url]http://msdn.microsoft.com/library/en-us/ado270/htm/pg_ado_providers_5.asp[/url]


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"




    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  18. #17

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    H Bob. I got a feeling I will get this right at some point. As stated, in
    a previous reply, I now have "Modify" permissions set on the
    IUSR_Machinename and IWAM_Machinename accounts. I tried to connect via the
    connection string and received the error message:

    Error Type:
    Microsoft JET Database Engine (0x80040E4D)
    Cannot start your application. The workgroup information file
    is missing or opened exclusively by another user.
    /wcg/games.asp, line 561

    Keep in mind this error occurs after I the database has been hit once and
    another attempt is being
    tried.


    The code that shows the second attempt to connect to the database follows
    next:

    set DBcon=Server.CreateObject("ADODB.Connection")
    DBcon.ConnectionTimeout=40

    cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    Server.MapPath("shopping500.mdb")

    DBcon.Open cst,1,2

    Set rst1=Server.CreateObject("ADODB.Recordset")
    qry1 = "Select tournCityName, tournName, tournAddress1, tournAddress2,
    tournPCode, " & _
    "tournVenue " & _
    "from tournInfo " & _
    "WHERE tournId = " & number

    'response.write(qry1 & "</br>")
    rst1.Open qry1, DBCon

    if not rst1.eof then

    response.write("<tr>")
    response.write("<td width=80 align=left class='lightBg'>")
    response.write(rst1("tournCityName"))
    response.write("</td>")
    response.write("<td width=160 align=left class='lightBg'>")
    response.write(rst1("tournVenue"))
    response.write("</td>")

    response.write("<td width=100 align=left class='lightBg'>")
    response.write(rst1("tournName"))
    response.write("</td>")
    response.write("<td colspan=2 align=left class='lightBg'>")
    response.write(rst1("tournAddress1") & ", ")
    if rst1("tournAddress2") <> "" then
    response.write (rst1("tournAddress2") & ", ")
    end if
    response.write(rst1("tournCityName") & ", " & rst1("tournPCode"))
    response.write("</td>")

    response.write("</tr>")


    end if



    Set rst2=Server.CreateObject("ADODB.Recordset")
    qry2 = "SELECT tournGames.tournGameId as gameId, tournGames.tournGameInfoId
    as gameInfoId, tournGames.tournGameCost as gameCost, " & _
    "tournGames.tournGameArrival as gameArrival, gameInfo.gameName as
    gameName " & _
    "FROM tournGames INNER JOIN gameInfo " & _
    "ON tournGames.tournGameInfoId=gameInfo.gameId " & _
    "WHERE tournGames.tournId = " & _
    number
    'response.write(qry2 & "</br>")
    rst2.Open qry2, DBCon

    Do while not rst2.eof
    'response.write("gameId = " & rst2("gameId") & " gameInfoId = " &
    rst2("gameInfoId") & "</br>" )
    response.write("<tr>")
    response.write("<td width=80 align=left>")
    response.write("&nbsp;")
    response.write("</td>")

    response.write("<td width=160 align=left class='lightBg'>")
    response.write(rst2("gameName"))
    response.write("</td>")

    response.write("<td width=100 align=left class='lightBg'>")
    response.write(rst2("gameCost"))
    response.write("</td>")

    response.write("<td width=200 align=left class='lightBg'>")
    response.write(rst2("gameArrival"))
    response.write("</td>")

    response.write("<td width=20 align=left class='lightBg'>")
    response.write("<input type=checkbox name='selgames' value=")
    response.write(rst2("gameId"))
    response.write(">")
    response.write("</td>")

    response.write("</tr>")

    rst2.MoveNext
    Loop

    DBcon.Close
    Set DBcon=Nothing
    Set rst1=Nothing
    Set rst2=Nothing


    I have provided enough information to help you with this.

    Thanks
    Terry

    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:eGqJwdKwDHA.1996@TK2MSFTNGP12.phx.gbl...
    > Terry Murray wrote:
    > > No, Chris, as far as I know I have not been setting the Mode
    > > property of the connection object to anything. Perhaps, there is a
    > > default that I am not aware of. I have since been able to locate the
    > > IUSR_Machinename and IWAM_Machinename accounts. After setting the
    > > permission properties of these accounts to "Modify" I then went back
    > > to trying to connect via a dsn and have been able to with no problems.
    > > I would still like to know how to connect the dsn-less way and would
    > > appreciate any other help you can provide me with.
    > >
    >
    > Terry Murray also wrote (in the other thread):
    > > Hi Bob. I have since been able to locate the IUSR_Machinename and
    > > IWAM_Machinename accounts (thank you). After setting the permission
    > > properties of these
    > > accounts to "Modify" I was not successful. What happens is that I
    > > can hit the database once but after any other attempts I get the
    > > error message.
    >
    > I'm confused. In your reply to Chris, you said this:
    > After setting the permission properties of these
    > accounts to "Modify" I then went back to trying to connect via a dsn
    and
    > have been able to with no problems.
    >
    > Let's see, which reply came later ... hmm, it seems that this is the later
    > message. So your problem is not solved?
    >
    > > As Chris, pointed out in another post, I may have the
    > > mode property for the connection object set to the wrong value.
    > > I went back to trying to connect via a dsn and have been able to
    > > with no problems. Perhaps, there is a default that I am
    > > not aware of the mode property.
    > > .
    > > I would still like to know how to connect the dsn-less way and would
    > > appreciate any other help you can provide me with.
    > >
    > > Perhaps you can show what the connection string and code for the mode
    > > that I open with should look like.
    > >
    >
    > The default mode is shared. It should not have to be set explicitly. I
    > heartily endorse getting rid of the dsn. Here is a sample connection
    string:
    >
    > sConnect = "Provider=Microsoft.Jet.4.0.OLEDB;" & _
    > "Data Source=p:\ath\to\database.mdb"
    >
    > Notice that you have to provide a file system path to the database, just
    as
    > you have to do when creating a dsn. In fact, if you open your current dsn,
    > you should be able to copy and paste the path from it. Also notice that I
    do
    > not bother supplying a User ID or blank password.
    >
    > The Mode property controls how a connection is established. I have never
    had
    > to set it.
    > [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdapro04_4.asp[/url]
    >
    > Take a look at this as well:
    > [url]http://msdn.microsoft.com/library/en-us/ado270/htm/pg_ado_providers_5.asp[/url]
    >
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >
    >
    >
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >

    Terry Murray Guest

  19. #18

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    Terry Murray wrote:
    > DBcon.Open cst,1,2
    >
    Why the 1,2?

    Just do this:

    DBcon.Open cst

    By proividing these arguments (1,2), the provider thinks you are passing a
    user name and password, so it is looking for a workgroup information file so
    it can validate the username and password.

    From [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth03.asp:[/url]

    connection.Open ConnectionString, UserID, Password, Options

    The MSDN library can be your friend if you use it :-)

    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

  20. #19

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    Thanks Bob. It now finally works properly. I was wondering what are the
    advantages of the connection string over the dsn?

    Terry

    "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    news:u2rw30LwDHA.2540@TK2MSFTNGP09.phx.gbl...
    > Terry Murray wrote:
    > > DBcon.Open cst,1,2
    > >
    >
    > Why the 1,2?
    >
    > Just do this:
    >
    > DBcon.Open cst
    >
    > By proividing these arguments (1,2), the provider thinks you are passing a
    > user name and password, so it is looking for a workgroup information file
    so
    > it can validate the username and password.
    >
    > From [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth03.asp:[/url]
    >
    > connection.Open ConnectionString, UserID, Password, Options
    >
    > The MSDN library can be your friend if you use it :-)
    >
    > Bob Barrows
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >

    Terry Murray Guest

  21. #20

    Default Re: Error while using OLEDB (Jet) for Access within ASP

    "Terry Murray" <tgmurray@rogers.com> wrote in message
    news:BMlCb.1378$ea%.443@news01.bloor.is.net.cable. rogers.com...
    > Thanks Bob. It now finally works properly. I was wondering what are
    the
    > advantages of the connection string over the dsn?
    >
    > Terry
    >
    > "Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
    > news:u2rw30LwDHA.2540@TK2MSFTNGP09.phx.gbl...
    > > Terry Murray wrote:
    > > > DBcon.Open cst,1,2
    > > >
    > >
    > > Why the 1,2?
    > >
    > > Just do this:
    > >
    > > DBcon.Open cst
    > >
    > > By proividing these arguments (1,2), the provider thinks you are
    passing a
    > > user name and password, so it is looking for a workgroup information
    file
    > so
    > > it can validate the username and password.
    > >
    > > From
    [url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth03.asp:[/url]
    > >
    > > connection.Open ConnectionString, UserID, Password, Options
    > >
    > > The MSDN library can be your friend if you use it :-)
    > >
    > > Bob Barrows
    > >
    > > --
    > > Microsoft MVP -- ASP/ASP.NET
    > > Please reply to the newsgroup. The email account listed in my From
    > > header is my spam trap, so I don't check it very often. You will get
    a
    > > quicker response by posting to the newsgroup.
    > >
    > >
    Terry-

    I'm glad you got it working, but it's frustrating that it took so long
    to resolve your problem. If you had posted the above code in your
    original post, your issue would have been resolved three days ago. My
    fault for not being more insistent about showing more code. Here's a
    link on the benefits of DSN-Less connection strings:

    [url]http://aspfaq.com/show.asp?id=2126[/url]

    HTH
    -Chris Hohmann


    Chris Hohmann 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