DA for Mac OS problem


(Alan Olson) #1

I have written the following code that I believe deletes some detail records when for me:

 If self.JobDetTable.rowCount>0 then
        for d:Integer := self.JobDetTable.rowCount downto 1 do

The loop processes correctly, but when I get to the ApplyChangesForTable() call I get the following error:

An exception occurred in maajobs, thread 6898

Type: NSException


Some errors were encountered while applying changes to server: 

 Table 'jobdetail': 1 error(s) were found during update. 

 1: No rows were affected by this update

Call Stack:

00007FFF50BEDC46, libobjc.A.dylib, , objc_exception_throw, objc_exception_throw()
0000000103128A51, maajobs, DARemoteDataAdapter.m, -[DARemoteDataAdapter applyChangesForTables:], DARemoteDataAdapter.applyChangesForTables:(NSArray)
00000001030EA506, maajobs, MainWindowController.pas, -[MainWindowController DeleteJobClick:], MainWindowController.DeleteJobClick:(id*)

What am I doing wrong?

DA version
Elements/Fire version

(marc hoffman) #2

This would usually happen if you apply an “empty” update, eg one that would effect no change, either because it has no values changed, or because its set to update an existing row based on a primary key that no longer exists.