Code not working in 4.1 anymore

Hi

We moved from 3.5.7 to 4.1. Of course we had to do some adjustments to get the new code to run. Now we tried our parser and found it not working and having a strange behaviour. The databaseManager.saveData does under various circumstances not save updated records. But it does in some other circumstances. We debugged already some hours and just can’t figure out what the difference of saving/not saving is.
Anybody already made such experiences? The strange thing is there are no errors - the updated records are just not saved. There is no error indication in the servoy_log nor in the console which seems associated with the savaData problem.

Any ideas?

Regards, Robert

Hi Robert,

Check what databaseManager.saveData() returns. It’s a boolean, when false then it couldn’t save 1 or more records.
Then with databaseManager.getFailedRecords() you can check which records failed and check the exception property of these records.

Hope this helps.

Hi Robert

Thanks, what we found so far:

  • The saveData problem was “only” a database constraint problem
  • The match method problem is described here: viewtopic.php?f=8&t=12099

Thanks, Robert

PS: By the way, the CREATE DATABASE … TEMPLATE … is really great!

ROCLASI:
Hi Robert,

Check what databaseManager.saveData() returns. It’s a boolean, when false then it couldn’t save 1 or more records.
Then with databaseManager.getFailedRecords() you can check which records failed and check the exception property of these records.

Hope this helps.

Hi Robert,

Robert Huber:
PS: By the way, the CREATE DATABASE … TEMPLATE … is really great!

Yeah, it is such a timesaver. :D