Trying to wrap my mind around this. So I have dataset that is populated from two tables using an outer-join. I.e
hQuery:QUERY-PREPARE("PRESELECT EACH Table1 NO-LOCK,FIRST Table2 NO-LOCK WHERE " +
"Table2.field1 = Table1.field1 outer-join").
This in turn is used to populate an UltraGrid. The fields in the grid are updateable from Table1 as is one field from Table2. Running a SaveData procedure using Save-Row-Changes for any row-state of 1,2 or 3 works fine except for saving any change to Table2.field1. How can I also save the change to Table2.field1 as it will only will save the changes to Table1.fields? I know I am missing something here but whatever it seems like it should be obvious but I can't seem to figure it out.
Thanks in advance,
Brad
OE 10.2B
kopfb wrote:
Trying to wrap my mind around this. So I have dataset that is populated from two tables using an outer-join. I.e
hQuery:QUERY-PREPARE("PRESELECT EACH Table1 NO-LOCK,FIRST Table2 NO-LOCK WHERE " +
"Table2.field1 = Table1.field1 outer-join").This in turn is used to populate an UltraGrid. The fields in the grid are updateable from Table1 as is one field from Table2. Running a SaveData procedure using Save-Row-Changes for any row-state of 1,2 or 3 works fine except for saving any change to Table2.field1. How can I also save the change to Table2.field1 as it will only will save the changes to Table1.fields? I know I am missing something here but whatever it seems like it should be obvious but I can't seem to figure it out.
Thanks in advance,
Brad
OE 10.2B
save-row-changes has optional parameters that allow you to specify which table in the data-source you want to update.
So you can do:
mybuffer:save-row-changes(). /* 1st is default */
mybuffer:save-row-changes("table2").
I do not know how this behaves if the outer-joined record is not there or if the rowstate is create or delete.
Thanks! That has gotten me down the right path.