Displaying data in form

system OS X servoy 1.2rc2, MySQL4.0.13

Hi all,

I tried importing some data through Servoy into MySQL. This worked OK as the data do show up in mysql (verified through CocoaMySQL). However only some fields show up in the form. I mean all fields show up on the form but some appear to be empty, while they are not. After importing a second time same problem but with other fields. Very confusing :?: :?:
Any ideas ?

Thanks

Odysseus

If you restart servoy, are you still seeing fields empty that are filled in in the Database?

absolutely…Maybe I should add that Servoy is running in Demo, as I am trying to evaluate the software

That you evalutate the software shouldn’t matter.

But then it is very hard for me to guess what is going wrong there. If you edit an field that displays empty (and should contain data if you look at the db itself).

After the edit is the data in the database updated?
If so what do you then see after a restart/reload?
Then that data you changed is also not there anymore?

If it doesn’t update youre value.. Do you get a error or something?

:oops:

I think it all comes down to an error on my part. But in order to prevent this from happening again, I think this is what happened.
Build table no problem
imported data made a mistake
discovered mistake delete all records and then quit. I think that here was the problem. Can you delete all records, then immediately quit (before all records are deleted)?
imported again correctly
had a recordset with correct entries and partially incorrect entries ( because all records were not deleted). If this is correct then I would qualify this as a bug. I think the application would need to prevent you from quitting as long as the operation is not finished.

Do my assumptions have any value?

Greetings

Hi,

By default the deleteAll (in the menuBar) doesn’t use transactions, but autocommit.
So quiting Servoy in the middle of such an action may result in having only half of your set deleted.

Solution:
attach transaction script to onDeleteAllRecordsCmd

databaseManager.startTransaction()
controller.deleteAllRecords()
databaseManager.commitTransaction()

This way the database will only commit AFTER all records are deleted ELSE
rollback.