Subject Re: [IBO] Cannot edit current row error
Author TeamIBO
> My EditSQL & InsertSQL are IBO-Editor generated for table JOBS and
> look OK. I can insert OK, and change all the other fields, except
> this one (PERCENTAGE).

> I must have some property for this field set wrong?

Have you defined KeyRelation on your query to "JOBS" ??

What happens if you change the order of these statments like...

JobsQry->Insert();
JobsQry->FieldByName("CLIENTNO")->AsInteger = nClientNo;
JobsQry->FieldByName("ACCNT_ID")->AsInteger = nAccntId;
JobsQry->FieldByName("AMOUNT")->AsFloat = fAmount;
JobsQry->FieldByName("PERCENTAGE")->AsInteger = nPercent; // down
JobsQry->FieldByName("REQUESTED")->AsDate = sRequested;
JobsQry->FieldByName("REQUIRED")->AsDate = sRequired;
JobsQry->FieldByName("DESCRIPTION")->AsString = sDescription;
JobsQry->Post();

IOW does the problem follow the "PERCENTAGE" field assignment, or is
it always the field after "ACCNT_ID" or what?

Which ACCNT_ID value is defined in the select SQL (J.ACCNT_ID or
A.ACCNT_ID)??

Perhaps posting the details of the callstack when the cannot edit
current row occurs may help us to see what is happening.

--
Geoff Worboys - TeamIBO
Telesis Computing