rogel:
…in order to create the INSERT SQL Statement?
Note that with Servoy you rarely do INSERT statements. Instead Servoy has two objects that automatically generate the SQL for you: controller and foundset. If you’re new to Servoy, a good review here:
rogel:
…in order to create the INSERT SQL Statement?
Note that with Servoy you rarely do INSERT statements. Instead Servoy has two objects that automatically generate the SQL for you: controller and foundset. If you’re new to Servoy, a good review here:
I am weighing which is a better design for the logic?
a. Fill the foundset will ALL the records from the XML. Then for each record in foundset check the product rules and delete from the foundset if it fails. When all the records in the foundset is done then call saveData?
b. As you go along the records from the XML, add new record in the foundset check the product rule, if it fails delete it from the foundset else call savedata right away?
Btw, the table(e.g. Product) might have extension/lookup tables(e.g. Product_Ext). What obstacles can you see based on my choices? I am not sure if I need to create another foundset for the extension tables or is there a quicker way?
rogel:
I am weighing which is a better design for the logic?
a. Fill the foundset will ALL the records from the XML. Then for each record in foundset check the product rules and delete from the foundset if it fails. When all the records in the foundset is done then call saveData?
b. As you go along the records from the XML, add new record in the foundset check the product rule, if it fails delete it from the foundset else call savedata right away?
Both of these options sound a little too intensive. Is there any reason that for each record in the XML, BEFORE you add it to the foundset you check the product rules and then if it passes, then you can add it to the foundset?
rogel:
I am weighing which is a better design for the logic?
a. Fill the foundset will ALL the records from the XML. Then for each record in foundset check the product rules and delete from the foundset if it fails. When all the records in the foundset is done then call saveData?
b. As you go along the records from the XML, add new record in the foundset check the product rule, if it fails delete it from the foundset else call savedata right away?
Both of these options sound a little too intensive. Is there any reason that for each record in the XML, BEFORE you add it to the foundset you check the product rules and then if it passes, then you can add it to the foundset?
Thanks for the suggestion. Actually, there is already a product rules validation involving a form though I am still studying how I can re-use.