The Case is: Add TMSQuery component to my form and link it to a "TEST" table with "OID" field as identity and "Name" as VarChar , and auto generates the Insert, Update Delete Statements, and set CachedUpdates to True, and connect the MSQuery to DBGrid component.
When try the following procedures a bug is raised:
1- Insert a new record, fill the "Name" value.
2- Call Connection.ApplyUpdate, success with no errors, but "OID" did not get the new value form the database.
3- Edits the row with new value for the "Name" field.
4- Call Connection.ApplyUpdate, failed with "Updates Failed. 0 record found" becuase the "OID" field did not have any value.
I believe this is bug, and if not please told me how to correct this issue???
Best Regards,
Ahmed Hijazi P. Eng.
Code: Select all
CREATE TABLE XY(
[OID] int IDENTITY(1,1) NOT NULL,
[Name] varchar(250) NOT NULL
)