Problem with Requery/Update

FragenFragerFragenFrager Member Posts: 56
Hello everyone,
working with a Navision 2009 R2 DB (Classic Client) changing data with a SQL-DB via ADO I'm now facing a Problem:

I put data from a NAV-Table into the SQL DB with AddNew and Update, so far it works. After having written data to the SQL-DB, I have to put a value of 1 to a Status field there. This is the code (I did not find a way to fomat it):


gatADORecordSet.Fields.Item(FORMAT(gTxT_ExportOrderHead_ProcState)).Value := 47;
gatADORecordSet.Update;
gatADORecordSet.Requery(ginRequeryMethod);
gatADORecordSet.Fields.Item(FORMAT(gTxT_ExportOrderHead_ProcState)).Value := 1;
gatADORecordSet.Update;

The value of 47 is being put to gatADORecordSet.Fields.Item(FORMAT(gTxT_ExportOrderHead_ProcState)).Value . Unfortunately the value of 1 is not. I also tried Close and Open instead of Requery, but it had no effect.

Has anyone an idea what I did wrong?

With kind regards.
Sign In or Register to comment.