Board index » delphi » Enabling Row-Level Locking in Access2000

Enabling Row-Level Locking in Access2000

I am using ADOExpress to connect to an Access 2000 database using Jet 4.

In Access I have set the database to use row level locking, but I still
get page level locking instead. I have tried setting various parameters
in the connection string, but without success.

Has anyone got row level locking to work?

Thanks!

 

Re:Enabling Row-Level Locking in Access2000


Hi Robert,

Check the property "Jet OLEDB:Database Locking Mode" in your connection
string ("All" tab). For row-level locking it should be 1
(JET_DATABASELOCKMODE_ROW).

http://msdn.microsoft.com/library/officedev/odeopg/deovrpagelevellock...
cordlevellocking.htm

Thrse

"robert2" <robe...@nospam.lineone.net> a crit dans le message news:
390EC2A1.7...@nospam.lineone.net...

Quote
> I am using ADOExpress to connect to an Access 2000 database using Jet 4.

> In Access I have set the database to use row level locking, but I still
> get page level locking instead. I have tried setting various parameters
> in the connection string, but without success.

> Has anyone got row level locking to work?

> Thanks!

Re:Enabling Row-Level Locking in Access2000


Hi Robert

Quote
> There is also supposed to be a "Jet OLEDB:Locking Granularity" property
> on the Recordset object which should be set to 2 for row-level locking,
> but I have iterated through all the properties and it does not exist.
> Any ideas?! Does anyone know if row level locking works using MSDE or
> the BDE with Access 2000 tables?

I can't access to the provider-specific properties (Jet OLEDB:xxxx) of the
Recordset object either. It's strange because with ADOX there is no problem
to access them for the Table, Column and Index objects...
But I read that 2 was the default for "Jet OLEDB:Locking Granularity", so it
should be all right, as long as you have set the database locking mode to 1.
Sorry, I never tried using row-level locking mode, but maybe there are also
some other properties to set such as LockType in ADO?
I don't think you can use the BDE with Access 2K. It was the reason I
switched to ADO.
Good luck anyway.

Thrse

Re:Enabling Row-Level Locking in Access2000


Thanks, Thrse, for your help.

Does anyone know if MSDE provides row-level locking with Access 2000
data? I'd be very glad to hear from someone who has Delphi connected to
Access and has row-level locking working, or can suggest a work around.

Thanks!

Quote
Thrse Hanquet wrote:

> Hi Robert
> > > There is also supposed to be a "Jet OLEDB:Locking Granularity" property
> > on the Recordset object which should be set to 2 for row-level locking,
> > but I have iterated through all the properties and it does not exist.
> > Any ideas?! Does anyone know if row level locking works using MSDE or
> > the BDE with Access 2000 tables?

> I can't access to the provider-specific properties (Jet OLEDB:xxxx) of the
> Recordset object either. It's strange because with ADOX there is no problem
> to access them for the Table, Column and Index objects...
> But I read that 2 was the default for "Jet OLEDB:Locking Granularity", so it
> should be all right, as long as you have set the database locking mode to 1.
> Sorry, I never tried using row-level locking mode, but maybe there are also
> some other properties to set such as LockType in ADO?
> I don't think you can use the BDE with Access 2K. It was the reason I
> switched to ADO.
> Good luck anyway.

> Thrse

Re:Enabling Row-Level Locking in Access2000


:

Quote
>Does anyone know if MSDE provides row-level locking with Access 2000
>data?

MSDE doesn't provide any access to Access 2000 data
MSDE is a slightly scaled down version of MS SQL server

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads