Exemple #1
0
 public void AddParameter(string pName, WMSDBTypes.WMSDBType pDbType, int pSize, object pVal, ParameterDirection pDirection)
 {
     try
     {
         if (objCommand != null)
         {
             if (pDirection == ParameterDirection.Input)
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType), pSize).Value = (pVal == null) ? DBNull.Value : pVal;
             else
                 objCommand.Parameters.Add(pName,  WMSDBTypes.SQL(pDbType)).Direction = ParameterDirection.Output;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public void AddParameter(string pName, WMSDBTypes.WMSDBType pDbType, int pSize, object pVal, ParameterDirection pDirection)
 {
     try
     {
         if (objCommand != null)
         {
             if (pDirection == ParameterDirection.Input)
             {
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType), pSize).Value = (pVal == null) ? DBNull.Value : pVal;
             }
             else
             {
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType)).Direction = ParameterDirection.Output;
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }