Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 8th, 2005, 05:40 AM
Registered User
 
Join Date: Jun 2005
Location: London, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Locking in Access DB linked to SQL Server backend

Hi
I'm a newbie to Access, and have been given an existing Access database to work with. We've exported the data into SQL Server, so we now have Access forms and queries linking to SQL Server tables.

This seemed to be working OK in tests. I've now copied in some live data (using an Append query in Access) and it looked OK. However, if I try to edit this data on a particular form, I get 'another user has edited this record ...' (even though I know no-one else is using the system yet). Furthermore, the 'save changes' button is disabled - so it's become impossible to update these records at all.

The Access db is set with Default Open mode = Shared; Default Record Locking = No Locks, and Open Database Using Record Level Locking = True. However, I understand that ODBC automatically assumes No Locks (ignores Default Record Locking) - this makes me wonder if I need to be changing settings somewhere other than in Access?

I'd be grateful for any help here, I've no idea where to start looking. As always, this has taken longer to set up than expected, so I'm under pressure to get it sorted yesterday.

Many thanks

Gibbers

  #2 (permalink)  
Old June 9th, 2005, 11:42 AM
Registered User
 
Join Date: Jun 2005
Location: London, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi again

I've looked into this a bit more, and established:

The problem exists at the table level - I can't update records directly in the table (in Access). I can add a record in the table, but can't then delete it (or any other record)

I can update records, and add and delete records in the SQL Server Table (using EM as sa). I can also update records on the server using Query Analyser, when logged in with the same login/pw as I use in Access.

I've set a unique PK in the SQL Server table, and Updated the ODBC link - this has not made any improvement.

I'd really appreciate some help on this!

Thanks

Gibbers

  #3 (permalink)  
Old April 24th, 2007, 03:11 PM
Registered User
 
Join Date: Apr 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to elkosupertech Send a message via AIM to elkosupertech Send a message via MSN to elkosupertech Send a message via Yahoo to elkosupertech
Default

Just so you know, I waited for an answer on this as well. Then did another search and discovered a similar issue with a different backend database. I went ahead and applied the change, and it did fix my issue with editing that table. This is what I gathered.

Your form/table has a Check box that its having an issue with. On the back-end database, change the field to int(erger), and it should work. Mine was set to bit, and apparently access doesn't like the 3rd option of Null. Let me know if that works for you, as I know it worked for me. :)

DJ

  #4 (permalink)  
Old April 24th, 2007, 03:20 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Something else I discovered last year while working on an Access/SQL Server project. When I set up Primary Keys on the SQL Server side, it brought Access to it's knees and caused all kinds of problems.

I ended up removing the Keys and Indexes, and performance increased dramatically. I also ended up adding a timestamp field to each table - I forget why, and I don't interact with it at all, but I think it helped each record have a unique identifier or something.

Mike

Mike
EchoVue.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to SQL Server locking problem echovue Access VBA 2 December 22nd, 2006 08:10 AM
Access database/SQL Server backend Question vbJupiter Access VBA 1 October 6th, 2006 07:59 PM
ms access form as criteria on sql server backend ottos13 Access 1 September 13th, 2006 12:14 PM
Access MDB with a Linked SQL Server Table..... timmaher Classic ASP Databases 0 September 28th, 2005 03:57 AM
SQL Server Database Locking with Access thatoneguy SQL Server 2000 3 September 7th, 2005 08:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.