Ask a Question related to ASP Database, Design and Development.
-
Terry Murray #1
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
-
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... -
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... -
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... -
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... -
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... -
Aaron Bertrand - MVP #2
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
-
Terry Murray #3
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
-
Chris Hohmann #4
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...following> Hi everbody:
>
> I am getting an error (message to follow) when using thebe> 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------> displayed.
>
> ----------------------------------------------------------------------information you> ----
>
> Please try the following:
>
> Click the Refresh button, or try again later.
>
> Open the localhost home page, and then look for links to the------> want.
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> ----------------------------------------------------------------------missing or> ----
>
> Technical Information (for support personnel)
>
> Error Type:
> Microsoft JET Database Engine (0x80040E4D)
> Cannot start your application. The workgroup information file isYou need to specify the workgroup file in your connection string. Please> 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
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
-
Chris Hohmann #5
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..."." represents current directory, so I think the two stamens are>> > 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]
equivalent (except for the semicolon of course).
Chris Hohmann Guest
-
Aaron Bertrand - MVP #6
Re: Error while using OLEDB (Jet) for Access within ASP
> "." represents current directory, so I think the two stamens are
Well, the question was more rhetorical. Now the serious question: why do> equivalent (except for the semicolon of course).
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
-
Chris Hohmann #7
Re: Error while using OLEDB (Jet) for Access within ASP
"Chris Hohmann" <nospam@thankyou.com> wrote in message
news:%23FAji6qvDHA.2440@TK2MSFTNGP12.phx.gbl...stamens = statements. Spellchecker is great but Stupiditychecker would> "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).
be better. ;-)
Chris Hohmann Guest
-
Chris Hohmann #8
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...do>> > "." 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: whystuff?> people insist on discombobulating their code with all this extraPossibly the connection string was cut and paste from a resource like>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
[url]http://www.able-consulting.com/ADO_Conn.htm[/url]. I know, that question was
rhetorical too. ;-p
-Chris
Chris Hohmann Guest
-
Terry Murray #9
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...[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]> "Terry Murray" <tgmurray@rogers.com> wrote in message
> news:ZIsBb.18339$3Eb1.9449@news04.bloor.is.net.cab le.rogers.com...> following> > Hi everbody:
> >
> > I am getting an error (message to follow) when using the> be> > 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> ------> > displayed.
> >
> > ----------------------------------------------------------------------> information you> > ----
> >
> > Please try the following:
> >
> > Click the Refresh button, or try again later.
> >
> > Open the localhost home page, and then look for links to the> ------> > want.
> > HTTP 500.100 - Internal Server Error - ASP error
> > Internet Information Services
> >
> > ----------------------------------------------------------------------> missing or> > ----
> >
> > Technical Information (for support personnel)
> >
> > Error Type:
> > Microsoft JET Database Engine (0x80040E4D)
> > Cannot start your application. The workgroup information file is>> > 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:
>>
> HTH-
> Chris Hohmann
>
>
Terry Murray Guest
-
Chris Hohmann #10
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...cannot> "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...> > following> > > Hi everbody:
> > >
> > > I am getting an error (message to follow) when using the> > > 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 itPlease> ----------------------------------------------------------------------> > be> >> > > displayed.
> > >> ----------------------------------------------------------------------> > ------> > information you> > > ----
> > >
> > > Please try the following:
> > >
> > > Click the Refresh button, or try again later.
> > >
> > > Open the localhost home page, and then look for links to the> >> > > want.
> > > HTTP 500.100 - Internal Server Error - ASP error
> > > Internet Information Services
> > >> > ------> > missing or> > > ----
> > >
> > > Technical Information (for support personnel)
> > >
> > > Error Type:
> > > Microsoft JET Database Engine (0x80040E4D)
> > > Cannot start your application. The workgroup information file is> >> > > 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.[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]>> > see "If using a Workgroup (System Database)" here:
> >simply> I do not think I am using a workgroup (but I could be wrong). I am> >
> > HTH-
> > Chris Hohmann
> >
> >you> running Access 2002 from a notebook that has IIS installed on it. CanHere's the link again:> provide me that link again. It seems to be dead.
>
> Thanks
> Terry
>
[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
-
Terry Murray #11
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...[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]> "Terry Murray" <tgmurray@rogers.com> wrote in message
> news:h0uBb.18642$3Eb1.10130@news04.bloor.is.net.ca ble.rogers.com...> cannot> > "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> Please> > ----------------------------------------------------------------------> > > 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.>> >> > > see "If using a Workgroup (System Database)" here:
> > >[url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]> simply> > I do not think I am using a workgroup (but I could be wrong). I am> > >
> > > HTH-
> > > Chris Hohmann
> > >
> > >> you> > running Access 2002 from a notebook that has IIS installed on it. Can>> > provide me that link again. It seems to be dead.
> >
> > Thanks
> > Terry
> >
> Here's the link again:
>>
> 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
-
Bob Barrows #12
Re: Error while using OLEDB (Jet) for Access within ASP
Terry Murray wrote:
Don't do this if you are not using workgroup security in this database!> 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.
>
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
-
Chris Hohmann #13
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...information> Okay Chris. I have finally found out how to create the workgroupand> file system file. I am not sure how to go about creating the usernameThere was no need to create a new workgroup file. What was listed as the> password for it. I am rather new to this so excuse me for my lack of
> knowledge.
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
-
Chris Hohmann #14
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...information> Okay Chris. I have finally found out how to create the workgroupand> file system file. I am not sure how to go about creating the username1. Please don't start new threads, or at the very least indicate that> password for it. I am rather new to this so excuse me for my lack of
> knowledge.
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
-
Terry Murray #15
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...> information> > Okay Chris. I have finally found out how to create the workgroup> and> > file system file. I am not sure how to go about creating the username>> > 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
-
Bob Barrows #16
Re: Error while using OLEDB (Jet) for Access within ASP
Terry Murray wrote:
Terry Murray also wrote (in the other thread):> 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.
>I'm confused. In your reply to Chris, you said this:> 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.
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?
The default mode is shared. It should not have to be set explicitly. I> 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.
>
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
-
Terry Murray #17
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(" ")
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...and> 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 dsnstring:> 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 connectionas>
> 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, justdo> 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 Ihad> not bother supplying a User ID or blank password.
>
> The Mode property controls how a connection is established. I have never> 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
-
Bob Barrows #18
Re: Error while using OLEDB (Jet) for Access within ASP
Terry Murray wrote:
Why the 1,2?> DBcon.Open cst,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
-
Terry Murray #19
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...so> 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> 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
-
Chris Hohmann #20
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...the> Thanks Bob. It now finally works properly. I was wondering what arepassing a> 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 arefile> > user name and password, so it is looking for a workgroup information[url]http://msdn.microsoft.com/library/en-us/ado270/htm/mdamth03.asp:[/url]> so> > it can validate the username and password.
> >
> > Froma> >
> > 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 getTerry-> > quicker response by posting to the newsgroup.
> >
> >
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



Reply With Quote

