Listing C


String orderQuery = "select order_date as Date,"

             + "c.customer_id as CustomerId, "
             
             + "customer_name as CustomerName, "
             
             + "o.item_id as ItemId, i.item_name as ItemName, "
             
             + "quantity as Quantity, o.unit as unit "
             
             + "from customers c, orders o, items i "
             
             + "where c.customer_id=o.customer_id and
             
            + "    o.item_id=i.item_id " ;
            
// generate the result set

xml.resultset.ResultSetXml rsx  =

       new xml.resultset.ResultSetXml(
       
                orderQuery,                              //   string with SQL query
                
                "none",                                     //   which columns should be CDATA sections
                
                "yes",                                         //   specify name attributes?
                
                “test_server:4000?user=sa");  //   login information (client method)
                
 
FileUtil.string2File( "OrderResultSet.xml",rsx.getXmlText() );