Hello, I have a application that read and write data to Navision on sql server. My app use oledb to connect to sql server. I don’t have problem to read or modify record. But when I add a record, I have some strange things … When I look into sql server, my record is good. When I look on a form list in Navision, NF display a lot of lines with the same record. And with navision, it’s impossible to delete this record. Any idea? I don’t set the “timestamp” field, what must I write into ?
You should not write directly into a Navision SQL database. There is a lot of business logic behind the scenes that doesn’t run that way, plus Navision has its own ‘unique’ way to create key values that you have to duplicate if don’t want the database to corrupt. There is only one way to safely write data into a Navision SQL database, and that is to go through Navision. if you HAVE to do it, then you should write into a table in the Navision database that is not used by Navision and have a process in Navision pick up the data and move it to Navision tables.
Hmmm. I replied to this topic, and my reply is gone, did we loose posts during the recent PAGE DOES NOT EXIST ERROR. Cant now remember the reply.
And what was your reply ? I find myself the solution. On my table I have Time fields. When I write current time with Navision, Navision write on sql : 01/01/1753 + time And with my other soft : I write getDate(), so, that write time, but, date too. My field is like 27/06/2005 + time And Navision doesn’t like that … Now, all is correct. In fact, I know that writing directly in sql server for Navision DB isn’t always a good thing. There is lot of things you must look for …
My reply was a more detailed version of what Daniel posted, but what he has posted covers it. Keep in mind, there is nothing wrong with writing to Navision tables, so long as you really know what you are doing. If you are writing to transaction tables, you can cause yourself some serious locking conflicts.