A customer table is created with customer order amounts in USD. This is data bound to the
data grid using the data adapter db2DataAdapter1, which is created for the customer table.
When the application starts, the select statement of the data adapter is executed and the
existing orders with USD amounts are displayed.
The update command for db2DataAdapter1 is used to calculate and update the
corresponding EURO amounts.
The conversion rate is obtained by running the GetRateWS user defined function;
that in turn invokes the currency conversion Web service from www.xmethds.net.
The rate obtained is applied to each of the USD amounts to obtain their corresponding EURO amounts.
All of the above is achieved by running one SQL statement as listed below:
update SSURANGE.CUSTOMER SET euroamt=decimal(getRateWS('US','EURO')