Try OpenEdge Now
skip to main content
.NET Open Clients
Passing Parameters : Passing DATASET and DATASET-HANDLE parameters : ProDataSet examples : Sample .NET Open Client application using a ProDataSet
 
Sample .NET Open Client application using a ProDataSet
The following example shows sample code for calling a procedure with a ProDataSet.
Calling a procedure with an output static ProDataSet
// The specified namespace is Acme
using Acme.StrongTypesNS;

// Calling a procedure with an output static ProDataSet.
Account appObj = new Account("AppServer://myhost/asbroker1", "", "", "");
OrderDSDataSet outDS = null;

// Call the procedure.
appObj.GetCustomersAndOrders(out outDS);

// Assign the ProDataSet to a DataGrid.
myForm.dataGrid1.DataSource = outDS;
myForm.dataGrid1.DataMember = "Customers";
myForm.dataGrid1.ReadOnly = true;
myForm.dataGrid1.CaptionText = "Number of Customers: " +
    outDS.Tables["ttCust"].Rows.Count;