// Create the ParamArray
ParamArray parms = new ParamArray(1); //Create DataSet DataSet proDataSet = new DataSet( ); ... // Create the ProDataSetMetaData ProDataSetMetaData dsMetaData = new ProDataSetMetaData ("dsCustOrd", "ProDataSetTest.StrongTypesNS.dsCustOrdDataSet"); // Create the TempTableMetaData for the Customer table TempTableMetaData ttCustMD = new TempTableMetaData ("ttCust", "ttCustDataTable", 3, false, , 0, null, null, null); ttCustMD.SetFieldMetaData(1, "CustNum", 0, Parameter.PRO_INTEGER, 0, 0); ttCustMD.SetFieldMetaData(2, "Name", 0, Parameter.PRO_CHARACTER 1, 0); ttCustMD.SetFieldMetaData(3, "SalesRep", 0, Parameter.PRO_CHARACTER 2, 0); // Create the TempTableMetaData for the Order table TempTableMetaData ttOrderMD = new TempTableMetaData ("OrderDetails", "OrderProxy.StrongTypesNS.OrderDetailsDataTable", 6, false, , 0, null, null, null); ttOrderMD.SetFieldMetaData (1, "OrderNum", 0, Parameter.PRO_INTEGER, 0, 0); ttOrderMD.SetFieldMetaData (2, "SalesRep", 0, Parameter.PRO_CHARACTER 1, 0); ttOrderMD.SetFieldMetaData (3, "OrderDate", 0, Parameter.PRO_DATE 2, 0); ttOrderMD.SetFieldMetaData (4, "ShipDate", 0, Parameter.PRO_DATE 3, 0); ttOrderMD.SetFieldMetaData (5, "TotalDollars", 0, Parameter.PRO_DECIMAL 4, 0); ttOrderMD.SetFieldMetaData (6, "OrderStatus", 0, Parameter.PRO_CHARACTER 5, 0); // Add the tables to the DataSet meta data dsMetaData.AddDataTable(ttCustMD); dsMetaData.AddDataTable(ttOrderMD); // Create and add the relations to the DataSet meta data ProDataRelationMetaData relation = new ProDataRelationMetaData ("custNum", 1, 0, 1, "CustNum,CustNum", null); dsMetaData.AddDataRelation(relation); parms.AddDataset(0, proDataSet, ParamArrayMode.OUTPUT, dsMetaData); |