|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Access File LockI am trying to run a simple VB.NET application using an Access 2000 database
as the OLEDB datasource directly from a CD. I have set the Locking mode = read. When I autorun the application from the CD I get the error message "Could not Lock File". When I run the same files from a folder on my USB Pen Drive it works fine even when the Folder property is "Read-Only". I have confirmed that no access.lockfile is created. Any ideas why it won't work from a CD? Thanks, On Tue, 25 Apr 2006 04:01:02 -0700, Geoff Murley <GeoffMur***@discussions.microsoft.com> wrote:
¤ I am trying to run a simple VB.NET application using an Access 2000 database ¤ as the OLEDB datasource directly from a CD. I have set the Locking mode = ¤ read. When I autorun the application from the CD I get the error message ¤ "Could not Lock File". When I run the same files from a folder on my USB Pen ¤ Drive it works fine even when the Folder property is "Read-Only". I have ¤ confirmed that no access.lockfile is created. Any ideas why it won't work ¤ from a CD? You might want to post your connection string so we can see what setting you are using for the Mode parameter. If you're using a read-only device the parameter must be set correctly to prevent Jet from attempting to create the corresponding .LDB file. Paul ~~~~ Microsoft MVP (Visual Basic) Hi Paul,
My Connection String is: OleDbConnection1.ConnectionString" value="Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source="\ToysDB\Toys.mdb";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider="Microsoft.Jet.OLEDB.4.0";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Read;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False Show quote "Paul Clement" wrote: > On Tue, 25 Apr 2006 04:01:02 -0700, Geoff Murley <GeoffMur***@discussions.microsoft.com> wrote: > > ¤ I am trying to run a simple VB.NET application using an Access 2000 database > ¤ as the OLEDB datasource directly from a CD. I have set the Locking mode = > ¤ read. When I autorun the application from the CD I get the error message > ¤ "Could not Lock File". When I run the same files from a folder on my USB Pen > ¤ Drive it works fine even when the Folder property is "Read-Only". I have > ¤ confirmed that no access.lockfile is created. Any ideas why it won't work > ¤ from a CD? > > You might want to post your connection string so we can see what setting you are using for the Mode > parameter. If you're using a read-only device the parameter must be set correctly to prevent Jet > from attempting to create the corresponding .LDB file. > > > Paul > ~~~~ > Microsoft MVP (Visual Basic) > On Tue, 25 Apr 2006 07:51:02 -0700, Geoff Murley <GeoffMur***@discussions.microsoft.com> wrote:
¤ Hi Paul, ¤ ¤ My Connection String is: ¤ ¤ OleDbConnection1.ConnectionString" value="Jet OLEDB:Global Partial Bulk ¤ Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking ¤ Mode=1;Jet OLEDB:Database Password=;Data ¤ Source="\ToysDB\Toys.mdb";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global ¤ Bulk ¤ Transactions=1;Provider="Microsoft.Jet.OLEDB.4.0";Jet OLEDB:System ¤ database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Read;Jet OLEDB:New ¤ Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't ¤ Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica ¤ Repair=False;User ¤ ID=Admin;Jet OLEDB:Encrypt Database=False Try changing the Mode parameter to: Mode=Share Exclusive Paul ~~~~ Microsoft MVP (Visual Basic) Hi Paul,
After a bit of experimenting 'Mode=Share Deny Write' worked. My app now runs nicely from a CD. Thanks for your help. Show quote "Paul Clement" wrote: > On Tue, 25 Apr 2006 07:51:02 -0700, Geoff Murley <GeoffMur***@discussions.microsoft.com> wrote: > > ¤ Hi Paul, > ¤ > ¤ My Connection String is: > ¤ > ¤ OleDbConnection1.ConnectionString" value="Jet OLEDB:Global Partial Bulk > ¤ Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking > ¤ Mode=1;Jet OLEDB:Database Password=;Data > ¤ Source="\ToysDB\Toys.mdb";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global > ¤ Bulk > ¤ Transactions=1;Provider="Microsoft.Jet.OLEDB.4.0";Jet OLEDB:System > ¤ database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Read;Jet OLEDB:New > ¤ Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't > ¤ Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica > ¤ Repair=False;User > ¤ ID=Admin;Jet OLEDB:Encrypt Database=False > > Try changing the Mode parameter to: > > Mode=Share Exclusive > > > Paul > ~~~~ > Microsoft MVP (Visual Basic) > |
|||||||||||||||||||||||