Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

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);
   }
}

FeedbackOpens in a new tab