Skip to main content
IBM Skip to main content
spHome | Products & services | Support & downloads | My account
Software > DB2 > DB2 Developer Domain
Developing an app using Web Services, DB2, and .Net
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedback
Next section
How it all works
  


How it all worksPage 1 of 1


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')
  *decimal(usdamt,7,2),7,2)


Next section
Main menuSection menuFeedback
About IBM | Privacy | Legal | Contact