|
 |
asp_databases thread: Connection problems to Access database (p 475 )
Message #1 by "Line Langlo Spongsveen" <Line@K...> on Tue, 18 Dec 2001 10:26:18 +0100
|
|
Hello,
I am quite new to setting ut ASP databases, but I tried example in
"Testing our Data Store" on p. 475 in "Beginning Active Server
Pages 3.0", with the Access database which I downloaded from
the Wrox web-site, with the file: "connection.asp". This worked
fine.
I then wanted to test this with my own database. It is also an
Access database. I put it in the same folder as the "Movies"
database and used the same code "connection.asp" (p 475) and
changed only the name of the database in the connection string
(objConn.Open) and the name of the tabel in the Recordset
(objRS.Open).
When I try to load the page I first get a pop-up box telling me that
an Exception of the type "run-time error" was not handled.
In my browser I get the 500.100 Internal Server Error - ASP Error
Error Type:
Microsoft JET Database Engine (0x80004005)
The Microsoft Jet database engine cannot open the file
'C:\datastores\cbcl_prisliste.mdb'. It is already opened exclusively
by another user, or you need permission to view its data.
/begASP/CBCLConnect.asp, line 25
Line 25 of my code is:
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
(Straight from the book)
Does anybody what and why this is happening?
Warm regards,
Line Spongsveen
Message #2 by "oneil brown" <oneil_brown@h...> on Tue, 18 Dec 2001 13:40:49
|
|
Try using this code, it is the code I use to connect to my access DB.
Please let me know if it helps.
MyConn.Open "DSN=nameofDB"
MyConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\directory\DB"
O'Neil Brown
oneil_brown@h...
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
Message #3 by Kyle Burns <kburns@c...> on Tue, 18 Dec 2001 09:10:06 -0500
|
|
My first suggestion would be to check the attributes of the file to ensure
that it is not marked "read only" by the file system. Also, make sure that
permissions are set correctly in your directory. The IUSR_<<MACHINE>>
account needs to have write access to the folder that the database resides
in. Even if you're only perform SELECT operations, an LDB file will need to
be written.
=================================
Kyle M. Burns, MCSD, MCT
ECommerce Technology Manager
Centra Credit Union
kburns@c...
>> -----Original Message-----
>> From: Line Langlo Spongsveen [mailto:Line@K...]
>> Sent: Tuesday, December 18, 2001 4:26 AM
>> To: ASP Databases
>> Subject: [asp_databases] Connection problems to Access
>> database (p 475 )
>>
>>
>> Hello,
>> I am quite new to setting ut ASP databases, but I tried example in
>> "Testing our Data Store" on p. 475 in "Beginning Active Server
>> Pages 3.0", with the Access database which I downloaded from
>> the Wrox web-site, with the file: "connection.asp". This worked
>> fine.
>>
>> I then wanted to test this with my own database. It is also an
>> Access database. I put it in the same folder as the "Movies"
>> database and used the same code "connection.asp" (p 475) and
>> changed only the name of the database in the connection string
>> (objConn.Open) and the name of the tabel in the Recordset
>> (objRS.Open).
>>
>> When I try to load the page I first get a pop-up box telling me that
>> an Exception of the type "run-time error" was not handled.
>> In my browser I get the 500.100 Internal Server Error - ASP Error
>>
>> Error Type:
>> Microsoft JET Database Engine (0x80004005)
>> The Microsoft Jet database engine cannot open the file
>> 'C:\datastores\cbcl_prisliste.mdb'. It is already opened
>> exclusively
>> by another user, or you need permission to view its data.
>>
>> /begASP/CBCLConnect.asp, line 25
>>
>> Line 25 of my code is:
>> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
>> (Straight from the book)
>>
>> Does anybody what and why this is happening?
>>
>> Warm regards,
>> Line Spongsveen
>>
>> $subst('Email.Unsub').
>>
Message #4 by "Tomm Matthis" <matthis@b...> on Tue, 18 Dec 2001 09:19:05 -0500
|
|
You need to make the *directory* where the MDB file resides read/write/delete
enabled to the IUSR_xxx account... this account needs to be able to
create/write to/ and delete the lock file (.LDB) for the .MDB database.
-- Tomm
> -----Original Message-----
> From: Line Langlo Spongsveen [mailto:Line@K...]
> Sent: Tuesday, December 18, 2001 4:26 AM
> To: ASP Databases
> Subject: [asp_databases] Connection problems to Access database (p 475 )
>
>
> Hello,
> I am quite new to setting ut ASP databases, but I tried example in
> "Testing our Data Store" on p. 475 in "Beginning Active Server
> Pages 3.0", with the Access database which I downloaded from
> the Wrox web-site, with the file: "connection.asp". This worked
> fine.
>
> I then wanted to test this with my own database. It is also an
> Access database. I put it in the same folder as the "Movies"
> database and used the same code "connection.asp" (p 475) and
> changed only the name of the database in the connection string
> (objConn.Open) and the name of the tabel in the Recordset
> (objRS.Open).
>
> When I try to load the page I first get a pop-up box telling me that
> an Exception of the type "run-time error" was not handled.
> In my browser I get the 500.100 Internal Server Error - ASP Error
>
> Error Type:
> Microsoft JET Database Engine (0x80004005)
> The Microsoft Jet database engine cannot open the file
> 'C:\datastores\cbcl_prisliste.mdb'. It is already opened exclusively
> by another user, or you need permission to view its data.
>
> /begASP/CBCLConnect.asp, line 25
>
> Line 25 of my code is:
> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> (Straight from the book)
>
> Does anybody what and why this is happening?
>
> Warm regards,
> Line Spongsveen
>
> $subst('Email.Unsub').
Message #5 by "Line Spongsveen" <Line@K...> on Tue, 18 Dec 2001 21:30:20
|
|
Thank you so much for your time. I set changed the permissions so that the IUSR now has
write-permission. And that solved the problem.
Merry Christmas to you all.
Line Spongsveen
> My first suggestion would be to check the attributes of the file to ensure
> that it is not marked "read only" by the file system. Also, make sure that
> permissions are set correctly in your directory. The IUSR_<<MACHINE>>
> account needs to have write access to the folder that the database resides
> in. Even if you're only perform SELECT operations, an LDB file will need to
> be written.
>
>
>
> =================================
> Kyle M. Burns, MCSD, MCT
> ECommerce Technology Manager
> Centra Credit Union
> kburns@c...
>
>
>
> >> -----Original Message-----
> >> From: Line Langlo Spongsveen [mailto:Line@K...]
> >> Sent: Tuesday, December 18, 2001 4:26 AM
> >> To: ASP Databases
> >> Subject: [asp_databases] Connection problems to Access
> >> database (p 475 )
> >>
> >>
> >> Hello,
> >> I am quite new to setting ut ASP databases, but I tried example in
> >> "Testing our Data Store" on p. 475 in "Beginning Active Server
> >> Pages 3.0", with the Access database which I downloaded from
> >> the Wrox web-site, with the file: "connection.asp". This worked
> >> fine.
> >>
> >> I then wanted to test this with my own database. It is also an
> >> Access database. I put it in the same folder as the "Movies"
> >> database and used the same code "connection.asp" (p 475) and
> >> changed only the name of the database in the connection string
> >> (objConn.Open) and the name of the tabel in the Recordset
> >> (objRS.Open).
> >>
> >> When I try to load the page I first get a pop-up box telling me that
> >> an Exception of the type "run-time error" was not handled.
> >> In my browser I get the 500.100 Internal Server Error - ASP Error
> >>
> >> Error Type:
> >> Microsoft JET Database Engine (0x80004005)
> >> The Microsoft Jet database engine cannot open the file
> >> 'C:\datastores\cbcl_prisliste.mdb'. It is already opened
> >> exclusively
> >> by another user, or you need permission to view its data.
> >>
> >> /begASP/CBCLConnect.asp, line 25
> >>
> >> Line 25 of my code is:
> >> objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> >> (Straight from the book)
> >>
> >> Does anybody what and why this is happening?
> >>
> >> Warm regards,
> >> Line Spongsveen
> >>
> >> $subst('Email.Unsub').
> >>
|
|
 |