you can create other TADOQuery and select by primary key without any join table and edit and then post data in sql database. the relation was master-detail and I connected all of the tables with the IDE Designer together. Update Tbl Floor(...); var FID: Integer; q: TADOQuery begin FID:=tbl_Floor.
That error message indicates that ADO can not find the record to be deleted or updated.
Most often the cause is that the table does not have a primary key defined or there is at least no column in the table where the contents is all unique.
Make sure you define a primary key in your MS-SQL tables.
The usual case for row cannot be updated is that you have default value constraints on the tables. Value := 0; Then ADO should use only the key for updates.
Be sure to set values for the fields in On New Record.
if your dataset contains an autoincrement field or one or more fields have default values then this may be the problem. After calling Post fields change their value in the db but that may not be detected by your dataset Actually, all the dbcomponents are thrown away now. Recreated the gui using regular components, made a middleware with objects, and handling the object to database transition - It sure was faster than messing with adonis... Actually ADO provides dynamic property to control Query Based Update (QBU) behavior Most of code is covered in ADOInt.pas, the appropriate event is On After Open for recordset properties (any TADOData Set), and On Create for connection properties (TADOConnection). I guess ‘Update Criteria’ is not the solution in this case, since it deals with WHERE clause to specify fields to be used for updates. You may change 'Update Resync' as follows: if you have join table in your query : TADOQuery cannot be edit and post data in sql database. I was using Access database and using some TADOTable on the form.