// Connect to the AppServer
OpenAppObject dynAO = new OpenAppObject("asbroker1"); // Define and initialize the variable for the input parameter int CustomerNumber = 33; // Create the ParamArray ParamArray parms = new ParamArray(1); // Add the input parameter to the ParamArray parms.addInteger(0, CustomerNumber, ParamArrayMode.INPUT); // Run the procedure or user-defined function dynAO.runProc("AddCustomer.p", parms); ... |
// Connect to the AppServer
OpenAppObject dynAO = new OpenAppObject("asbroker1"); // Define and initialize the variable for the input parameter Integer CustomerNumber = new Integer(33); // Code possibly affecting the value of CustomerNumber ... //Set the Integer value for the input parameter //to null or an int based on the variable value if (CustomerNumber.intValue() > 33) CustomerNumber = null; // Create the ParamArray ParamArray parms = new ParamArray(1); // Add the input parameter to the ParamArray parms.addInteger(0, CustomerNumber, ParamArrayMode.INPUT); // Run the procedure or user-defined function dynAO.runProc("AddCustomer.p", parms); ... |