disapearing values

Very strange:

In a network user A is entering a new record.

User B is in list view, chooses M-^Sshow allM-^T and by doing this ALL fields of user A are cleared, because this is the first record and has not been saved yet. Initial sort is on M-^SnameM-^T.

How can I prevent this?

TIA,
Stef

Are you using Database transactions? You can start a DB Transaction at the time a new record is added by User A, you can then do some validity checking, and if all is good “commit” the transaction, or if not, “rollback”. After the Commit is when the record should be available to User B. Check out Chapter 9 of the current Servoy Developer Volume 1: User’s Guide.

I don’t think database transactions are ment for this purpose!
I think controller.loadAllRecords() should not influence another client.

It seems the following problem
-the Sybase database can not differenciate between " " and NULL values in column
-so when you have a STORED calculation which returns a " " it does get stored as NULL in the sybase db
-an update is fired to clients having the record, which sees that the stored calc is not uptodate and returns a " " which does get stored as NULL in the sybase db
-an update is fired to clients having the record and now we are in an endless loop between one or more clients, and values are lost.

For us there is no easy way fixing this (if there is one at all), so bottom line DO NOT return " " in stored calcs when using the Sybase database.

So, when exactly would User A’s record be able to be retrieved by another client doing a loadAllRecords? When the new record is created or when it is saved or otherwise disposed of?

What would happen if a method executed by User A creates a new record in a table, but the method closes without performing a specific saveData operation? Is the record saved in the table anyway and available to other clients?

Thanks, Jan!

Problem solved.

Best regards,
Stef

DFehrenbach:
What would happen if a method executed by User A creates a new record in a table, but the method closes without performing a specific saveData operation? Is the record saved in the table anyway and available to other clients?

Many operations trigger a saveData, some examples:

  1. clicking on the form
  2. creating/duplication a(nother) record
  3. changing form
    etc.

The “e” in the status bar indicates if an edit is occurring (and a save has to happen)