integer rtn_1,rtn_2
// Here in below code the product table is the first table and the Supplier table is the second table
rtn_1 = dw_3.update(true,false)
IF rtn_1=1 THEN
dw_3.modify('product_productname.update=No')
dw_3.modify('product_unitprice.update=No')
dw_3.modify("product_id.Key=No")
dw_3.modify( "DataWindow.Table.UpdateTable = ~"supplier~"")
dw_3.modify("supplier_city.update=Yes")
dw_3.modify("supplier_country.update=Yes")
dw_3.modify("supplier_companyname.update=Yes")
dw_3.modify("supplier_contacttitle.update=Yes")
dw_3.Modify("supplier_contactname.update=Yes")
dw_3.modify("supplier_id.Key=Yes")
rtn_2 =dw_3.update(true,true)
If rtn_2 = 1 then
dw_3.modify('product_productname.update=Yes')
dw_3.modify('product_unitprice.update=Yes')
dw_3.modify("product_id.Key=Yes")
dw_3.modify("supplier_city.update=No")
dw_3.modify("supplier_country.update=No")
dw_3.modify("supplier_companyname.update=No")
dw_3.modify("supplier_contacttitle.update=No")
dw_3.Modify("supplier_contactname.update=No")
Commit using sqlca;
dw_3.retrieve ()
messagebox ('message', 'updated successfully!')
Else
Rollback using sqlca;
MessageBox("Table2 Update Failed", "Error : "+SQLca.sqlerrtext)
END IF
Else
Rollback using SQLCA;
MessageBox("Table1 Update Failed", "Error : "+SQLca.sqlerrtext)
end if