Error Editing Table Data via ODBC

In a MS Access database application, I’ve created a link via ODBC to a Navision table. I’ve got a VBA routine that uses DAO to open a recordset to the linked table and - using the rst.AddNew method - is able to write NEW records to this linked table. Apparently I can do this all day long. However, if I try to EDIT a record that already exists in the linked table using the rst.Edit method, I get an error stating that I and “another user are attempting to change the same data at the same time.” I get the same error when going into the linked table and manually trying to edit or delete an existing record. Normally, this is an Access table locking issue, but I think it might have to do with the limitations of the C/ODBC driver. Any suggestions? Could I accomplish the same AddNew/Edit task from within Access using a different approach? The Navision table I’m working with is a new custom table, and not one of the standard system tables. Thanks!

I am not saying it is, but it may be a licence issue. You may not have updated the Fin.flf that you are using for the ODBC with the licence that access your new table. Its worth a try. _________________________ David Singleton Navision Consultant since 1991 dmks22@home.com___________

Try to use ADO for reading/writing data. DAO have many stange errors when working with C/ODBC driver. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Try to use ADO for reading/writing data. DAO have many stange errors when working with C/ODBC driver. Business Applications Programmer Sertified Navision Developer SIA “Sintegra” Latvia

Thanks to everyone who responded! To address the replies: -Our license does allow for C/ODBC connectivity, otherwise I don’t think I would have been able to write the original record to the linked table. -The MS Access application I’m creating is curerntly working off of a single-user NF database for testing purposes. However, it will eventually be working off of the live, Navision server database. -I have not yet tried using ADO. I saw another post somewhere that said something to the effect that one should use DAO and not ADO, as the C/ODBC driver was too unstable for ADO. So I’m really confused about which method to use! I have found that record deletions or modifications can be performed on a linked NF table using SQL queries. So, for now I can incorporate cumbersome UPDATE or DELETE query strings using VBA within Access to do what I need. ADO or DAO would certainly make things simpler! I’d be interested to hear from anyone using ADO to modify existing records in a linked table, or a discussion of ADO versus DAO. Thanks, everyone!

The lastest c/odbc driver from Navision Financial or Navision Attain should have no problem in dealing with delete, insert and update from either ADO or DAO.

The solution is simple… Go to “Control Panel”–>“ODBC Data Sources (32Bits)”–>“Sample C/ODBC 32 bit”, click on “Options” and uncheck “Read only”. The default is read only when you install C/ODBC. I opened an ODBC connection to Navision and changed a salesperson name from MS Access 2000, and it worked. I also added a new quote and saw it in Navision 2.60B. So it’s possible to modify information in Navision database through C/ODBC.

Thanks, Shaman! I’m using a DSNless connection, so I have nothing set up in the ODBC DSN Manager. But I think I might be able to set the “read only” attribute within the ODBC connection string in my code. I’ll give it a try…