My Assistant
![]() ![]() |
|
|
Sep 11 2008, 03:05 PM
Post
#1
|
|
|
UtterAccess Member Posts: 13 |
This is a first for me and I would appreciate your help. I have created code to update the posting sequence and count detail in an accounting table. To test it, I imported the table into my database. Now I am ready to run the update on the production table which is in a SQL Server 2000 database. When I link the table to Access to update, I am given the run time error that the linked SQL table is 'read only' and not updatable.
Is this a connection issue and if so what steps do I need to take to correct it? This is what I currently have. rsRecordset.Open strSql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic Thanks |
|
|
|
Sep 11 2008, 06:43 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 4,549 From: North Carolina, USA |
Unlike Access, SQL requires there to be a Primary key for the table to be updateable. Do you have a Primary Key?
Another gotcha is if you add bit fields to your database set the default value to (0). If any exist in your present tables, set all Null values to 0. If you don't, sooner or later Access will give you an error telling you that another user has made changes to your record and you have to drop changes. That bogus message will led you down a long wild goose chase. |
|
|
|
Sep 12 2008, 07:23 AM
Post
#3
|
|
|
UtterAccess Member Posts: 13 |
Thanks for your reply. We have no bit fields in the database to worry about. Our problem is with the original design as this table was set up with no primary key. In fact this is what we are trying to fix. In the imported historical data the two fields of posting sequence and count detail were set to 9999 in each field. Once production began with the accounting system these two fields together created the unique identifier, but we still have the historical data sitting out there with 9999.
At this point I guess we will have to import the table into the Access database, perform the update, and then move this table over to SQL to replace the incorrect one. This is definitely a lesson learned in creating SQL tables. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 16th May 2012 - 07:27 PM |