On Wednesday 11 June 2014 16:44:31 Med Hamza wrote: > Here are the files. See attach. please > What happens by inserting a record is: - tsequencelink1 fetches a sequence number from server and stores the value in "NTIERS" datafield, sequence 0->1, "NTIERS" on client becomes 1. - tmsesqlquery1 executes your SQLinsert-statement " insert into tiers (lib) values (:lib) ; " - The server fires "BEFORE INSERT" trigger: " IF (NEW.NTIERS IS NULL OR NEW.NTIERS = 0) THEN NEW.NTIERS = GEN_ID(CPTTIERS, 1); NEW.CODE='C'; " - NEW.NTIERS is NULL because the INSERT statement does not provide a value -> "NEW.NTIERS = GEN_ID(CPTTIERS, 1);" is executed, sequence 1->2, "NTIERS" on server becomes 2. - There is no pf1_refreshinsert for the NTIERS field -> the actual value is visible after refresh only.
Suggestion: - delete tsequencelink1. - delete tmsesqlquery1.SQLInsert. - click on the ellipse button in the right objectinspector column by tmsesqlquery1.controller.fields.count. - select the needed fields in the right list. - click the arrow left button, the fields are copied to the left list. - click OK, the persistent fields will be created and listed in object inspector in or below fields.count. - activate providerflags1 pf1_refreshinsert for the fields NTIERS and CODE. Martin ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

