I saw some wierd behavior when putting get max records inside the loop, Every iteration that number changes and you end up only deleting half the records, when i meets the max record index.
I maybe misunderstanding things, but personally ,when working with sybase at the backend, it seems to me that an executesql command that says “truncate table xxxx” would delete all records of the table, without the overhead of every delete added to the log (as stated in the sybase docs) and eliminating the need for a potentially heavy loop
I have to say that on my dummy table it took surprisingly long (for 3 records , a few seconds) on the other hand I believe that for truncate it does really matter if its 3 or 500000 records; anyway this is a way for executing sql on your db backend. The executesql statement came from another language
Of course both the procedure and the method can be enhanced i.e. passing the table name as a variable,…
I may be mistaken about the functionality of databaseManager.executeStoredProcedure(), but in my understanding:
You should be careful using stored procedures to modify records. Servoy has gone to great lengths to ensure data consistency across simultaneous connected clients, and changing anything on the database level without servoy knowing about it can result in errors corrupted datasets and other undesired behavior.