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