// Define the variable for the output parameter
Int32 CustomerNumber; // Create the ParamArray ParamArray parms = new ParamArray(1); // Set up output parameter - notice no variable is needed at this point parms.AddInteger(0, null, ParamArrayMode.OUTPUT); // Run the procedure ... // Fill the output parameter // The output value is always returned as an Object // You need to cast the Object before assigning it. CustomerNumber = (Int32) parms.GetOutputParameter(0); |