performUpdate() issue

Hi all,

Servoy 4.1.0
Java 1.6
Windows XP pro
Mysql 5.x database

I am having a weird issue with performUpdate function.

I have 700 records in my forms.timesheet.foundset

When I try to update a column using the performUpdate, It updates only 400 rows

var theFoundsetUpdater = databaseManager.getFoundSetUpdater(forms.timesheet.foundset);
theFoundsetUpdater.setColumn('flag', 1);
theFoundsetUpdater.performUpdate();
databaseManager.saveData();

When I go to the timesheet layout I notice it alternately updates 200 rows (i.e updates first 200, followed by skipping the next 200, hence it updates 400 records and ignored 300 records)

But if I do the following it updates all the 700 rows

for(var i=1;i <= databaseManager.getFoundSetCount(forms.timesheet.foundset); i++)
{
 forms.timesheet.controller.setSelectedIndex(i);
 forms.timesheet.flag = 1;
}
databaseManager.saveData();

Am I missing something in the performUpdate that results in skipping 200 rows at a time when doing the update.

Regards
jdcunha

jdcunha,

The foundsetupdater tries to do an update in 1 statement when possible, but falls back to single updates when that is not possible, it seems that something goes wrong there.
Do you have tracking turned on? Does the foundset have a related condition/filter?

Please create a case in our support system with a sample solution that shows this error.

See viewtopic.php?f=8&t=6062

Rob

Hi Rob,

I do have tracking turned on for audit trail purposes.

What do you mean by foundset having a related condition/filter?

I will turn off tracking and run a test to see if it works.

Are there some special circumstances with respect to tracking that performUpdate does not work?

Regards
James

James,

When tracking is on we cannot do an ‘update tab set col=val where condition’ because we could not fill the tracking table.
With a related condition I mean, suppose you have searched in your foundset on a field from a relation, in that case we also fallback to update per record.

It should still update correctly, so if you have a situation where it does not, please file a case.

Rob

Hi Rob,

I turned off tracking and it worked correctly.

Thanks for letting me know the details.

Regards
jdcunha