Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?

AddInputParams

In order to avoid a lot of repetitive code, PhoneForm.cs provides the AddInputParams method. This method creates CacheParameter objects and adds them to their CacheCommand objects. The method is restricted in the types of CacheParameter objects it creates. Here are the restrictions:

  • It only creates Input parameters.

  • It only creates parameters of type NVARCHAR.

  • It only creates parameters that contain data with fifty characters or fewer.

Here is the method:


private void AddInputParams(CacheCommand cmd, params string[] cols)
 {
  foreach (String column in cols)
   {
     cmd.Parameters.Add(column,CacheDbType.NVarChar,50,column);
   }
}
Feedback