Access 2010 FE, SQL Server 2008 backend - Record locking (1 Viewer)

Shado

Registered User.
Local time
Today, 16:56
Joined
Jun 5, 2012
Messages
23
Hi all,

Unsure if this was the correct place to post this but here goes...

Essentially, I'm using an Access frontend to SQL server backend. I'm wanting to make it so that if I open record 2301 for example, and Joe Bloggs also opens this record, only I can edit it. I've been playing with SQL server locking but to no avail. Forms are currently bound to SQL views with update triggers. (Took over a pre-existing project and am ironing out a few issues currently existing in the system).

I've tried XLOCK, ROWLOCK to no avail.

Any ideas? :)
 

rodmc

Registered User.
Local time
Today, 06:56
Joined
Apr 15, 2010
Messages
514
Im not big on SQL server, but I think if you open the record in edit/update mode, then its locked automatically until you commit it back to the table

Maybe someone else can confirm this
 

Shado

Registered User.
Local time
Today, 16:56
Joined
Jun 5, 2012
Messages
23
Hi Rod,

Thanks for the reply. Sadly, nobody seems to be able to answer this. Guess it's back to the drawing board!
 

gotlength

Registered User.
Local time
Yesterday, 23:56
Joined
Apr 19, 2013
Messages
12
Did you figure out how to do this? I need to know how to lock the record also.
 

SandyShin

New member
Local time
Today, 01:56
Joined
Mar 29, 2012
Messages
4
The record only locks in SQL Server if you have opened it to UPDATE or DELETE it, a simple read will not lock it.
Go to the SQL forum and ask. I suspect you need to build a stored proc which will lock the record if you access it to read only
 

Users who are viewing this thread

Top Bottom