PeopleCode Insert/Update

Local SQL &INSERT, &UPDATE;


&INSERT = CreateSQL("%Insert(:1)");


&UPDATE = CreateSQL("%Update(:1)");


&recBO_ROLE = CreateRecord(Record.BO_ROLE);


&recBO_ROLE.FIELD1.Value = "xxx";


&recBO_ROLE.FIELD2.Value = "xxx";


&recBO_ROLE.FIELD3.Value = "xxx"; If Not (&UPDATE.Execute(&recBO_ROLE)) Then


If Not (&INSERT.Execute(&recBO_ROLE)) Then


Error ("Could Not insert or update");


End-If;




/* Die code kyk eers of hy kan update indien nie dan insert dit*/

Comments