|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

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
|
|
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
|

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
|
|
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
|

April 24th, 2007, 03:11 PM
|
Registered User
|
|
Join Date: Apr 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

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
|
|
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
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |