public void AddNullValuePara(string Name, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, DBNull.Value); oPara.Direction = GetParaType(Direction); this.oParameters.Add(oPara); }
/// <summary> /// Adds a Structured type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddStructuredPara(string Name, DataTable oValue, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Structured); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
public void AddBigIntegerNullPara(string Name, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Int); oPara.Direction = GetParaType(Direction); oPara.Value = DBNull.Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Binary type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddVarBinaryPara(string Name, byte[] oValue, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.VarBinary); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds the float para. /// </summary> /// <param name="Name">The name.</param> /// <param name="Value">The value.</param> /// <param name="Direction">The direction.</param> /// <author>Debajit Mukhopadhyay</author> /// <createdDate>19-Oct-09</createdDate> public void AddFloatPara(string Name, float Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Decimal); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerPara(string Name, int Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Integer); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
public void AddBooleanPara(string Name, bool Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Bit); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
public void AddDateTimePara(string Name, DateTime Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.DateTime); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerBigPara(string Name, Int64 Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.BigInt); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Structured type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddStructuredPara(string Name, DataTable oValue, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.PropVariant); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Varchar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddGuidPara(string Name, string Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlCeParameter oPara = new SqlCeParameter(Name, SqlDbType.Char, 38); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Char type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddCharPara(string Name, int Size, char Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value.Equals(null)) { oValue = DBNull.Value; } SqlCeParameter oPara = new SqlCeParameter(Name, SqlDbType.Char, Size); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Clob type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddImagePara(string Name, String Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Binary); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
public void AddNVarcharPara(string Name, int Size, string Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.NVarChar, Size); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
public void AddImagePara(string Name, byte[] Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.Image); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Timestamp type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddTimeStampPara(string Name, System.Byte[] Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.Timestamp); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
private ParameterDirection GetParaType(QueryParameterDirection Direction) { switch (Direction) { case QueryParameterDirection.Output: return(ParameterDirection.InputOutput); case QueryParameterDirection.Return: return(ParameterDirection.ReturnValue); default: return(ParameterDirection.Input); } }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerPara(string Name, int?Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Integer); oPara.Direction = GetParaType(Direction); if (Value == null) { oPara.Value = DBNull.Value; } else { oPara.Value = Value; } this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerBigPara(string Name, Int64?Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.BigInt); oPara.Direction = GetParaType(Direction); if (Value == null) { oPara.Value = DBNull.Value; } else { oPara.Value = Value; } this.oParameters.Add(oPara); }
public void AddDateTimePara(string Name, DateTime?Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.DateTime); oPara.Direction = GetParaType(Direction); if (Value == null) { oPara.Value = DBNull.Value; } else { oPara.Value = Value; } this.oParameters.Add(oPara); }
/// <summary> /// Adds the float para. /// </summary> /// <param name="Name">The name.</param> /// <param name="Value">The value.</param> /// <param name="Direction">The direction.</param> /// <author>Debajit Mukhopadhyay</author> /// <createdDate>19-Oct-09</createdDate> public void AddFloatPara(string Name, float?Value, QueryParameterDirection Direction) { SqlCeParameter oPara = new SqlCeParameter(Name, SqlDbType.Decimal); oPara.Direction = GetParaType(Direction); if (Value == null) { oPara.Value = DBNull.Value; } else { oPara.Value = Value; } this.oParameters.Add(oPara); }
/// <summary> /// Adds a NVarchar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddNVarcharParam(string Name, int Size, string Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.NVarChar, Size); oPara.Direction = GetParaType(Direction); if (null != Value) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds a DateTime type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDateTimeParam(string Name, Nullable <DateTime> Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.DateTime); oPara.Direction = GetParaType(Direction); if (Value.HasValue) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds an Big Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddBigIntegerParam(string Name, Nullable <Int64> Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.BigInt); oPara.Direction = GetParaType(Direction); if (Value.HasValue) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds an Image type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddImageParam(string Name, byte[] Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Image); oPara.Direction = GetParaType(Direction); if (null != Value) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds a NChar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddNCharParam(string Name, int Size, Nullable <char> Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.NChar, Size); oPara.Direction = GetParaType(Direction); if (Value.HasValue) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds a Varchar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddVarcharPara(string Name, int Size, string Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } else if (Value.Length == 0) { oValue = DBNull.Value; } OleDbParameter oPara = new OleDbParameter(Name, OleDbType.VarChar, Size); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Structured type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddStructuredPara(string Name, DataTable oValue, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Structured); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Varchar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddGuidPara(string Name, string Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } OleDbParameter oPara = new OleDbParameter(Name,OleDbType.Char,38); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
public void AddDecimalPara(string Name, byte Scale, byte Precision, decimal Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Decimal); oPara.Scale = Scale; oPara.Precision = Precision; oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Structured type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddStructuredPara(string Name, DataTable oValue, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.PropVariant); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds the float para. /// </summary> /// <param name="Name">The name.</param> /// <param name="Value">The value.</param> /// <param name="Direction">The direction.</param> /// <author>Debajit Mukhopadhyay</author> /// <createdDate>19-Oct-09</createdDate> public void AddFloatPara(string Name, float? Value, QueryParameterDirection Direction) { SqlCeParameter oPara = new SqlCeParameter(Name, SqlDbType.Decimal); oPara.Direction = GetParaType(Direction); if (Value == null) oPara.Value = DBNull.Value; else oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Varchar type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddVarcharPara(string Name, int Size, string Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } else if (Value.Length == 0) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.VarChar, Size); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a DateTime type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDateTimePara(string Name, DateTime Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.DateTime); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Char type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddCharPara(string Name, int Size, char Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value.Equals(null)) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.Char, Size); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Decimal type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Precision">Precision of the decimal number</param> /// <param name="Scale">Scale of the decimal number</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDecimalParam(string Name, byte Precision, byte Scale, Nullable <decimal> Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Decimal); oPara.Direction = GetParaType(Direction); oPara.Precision = Precision; oPara.Scale = Scale; if (Value.HasValue) { oPara.Value = Value; } else { oPara.Value = DBNull.Value; } this.m_oParameters.Add(oPara); }
/// <summary> /// Adds a Decimal type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Scale">Scale of the decimal number</param> /// <param name="Precision">Precision of the decimal number</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDecimalPara(string Name, byte Scale, byte Precision, decimal? Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Decimal); oPara.Precision = Precision; oPara.Scale = Scale; oPara.Direction = GetParaType(Direction); if (Value == null) oPara.Value = DBNull.Value; else oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Timestamp type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddTimeStampPara(string Name, System.Byte[] Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.Timestamp); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Binary type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddVarBinaryPara(string Name, byte[] oValue, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.VarBinary); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Decimal type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Scale">Scale of the decimal number</param> /// <param name="Precision">Precision of the decimal number</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDecimalPara(string Name, byte Scale, byte Precision, decimal Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Decimal); oPara.Scale = Scale; oPara.Precision = Precision; oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Converts parameter direction enum to the underlying sql type /// </summary> /// <param name="Direction">Enum value to convert</param> /// <returns>Underlying SqlClient value corresponding to the passed Enum</returns> private ParameterDirection GetParaType(QueryParameterDirection Direction) { switch (Direction) { case QueryParameterDirection.Output: return ParameterDirection.InputOutput; case QueryParameterDirection.Return: return ParameterDirection.ReturnValue; case QueryParameterDirection.InputOutput: return ParameterDirection.InputOutput; default: return ParameterDirection.Input; } }
/// <summary> /// Adds the float para. /// </summary> /// <param name="Name">The name.</param> /// <param name="Value">The value.</param> /// <param name="Direction">The direction.</param> /// <author>Debajit Mukhopadhyay</author> /// <createdDate>19-Oct-09</createdDate> public void AddFloatPara(string Name, float Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Decimal); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Clob type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Size">Size of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddImagePara(string Name, String Value, QueryParameterDirection Direction) { object oValue = (object)Value; if (Value == null) { oValue = DBNull.Value; } SqlParameter oPara = new SqlParameter(Name, SqlDbType.Image); oPara.Direction = GetParaType(Direction); oPara.Value = oValue; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerBigPara(string Name, Int64 Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.BigInt); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerPara(string Name, int Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Integer); oPara.Direction = GetParaType(Direction); oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerPara(string Name, int? Value, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, SqlDbType.Int); oPara.Direction = GetParaType(Direction); if (Value == null) oPara.Value = DBNull.Value; else oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds an Integer type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddIntegerBigPara(string Name, Int64? Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.BigInt); oPara.Direction = GetParaType(Direction); if (Value == null) oPara.Value = DBNull.Value; else oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a NULL value query parameter with Parameter Direction /// </summary> /// <param name="Name">Name of parameter</param> /// <param name="Direction">Parameter Direction</param> public void AddNullValuePara(string Name, QueryParameterDirection Direction) { SqlParameter oPara = new SqlParameter(Name, DBNull.Value); oPara.Direction = GetParaType(Direction); this.oParameters.Add(oPara); }
public void AddDateTimePara(string Name, DateTime? Value, QueryParameterDirection Direction) { OleDbParameter oPara = new OleDbParameter(Name, OleDbType.Date); oPara.Direction = GetParaType(Direction); if (Value == null) oPara.Value = DBNull.Value; else oPara.Value = Value; this.oParameters.Add(oPara); }
/// <summary> /// Adds a Decimal type query parameter with /// the given direction type. /// </summary> /// <param name="Name">Name of the parameter.</param> /// <param name="Scale">Scale of the decimal number</param> /// <param name="Precision">Precision of the decimal number</param> /// <param name="Value">Value of the parameter.</param> /// <param name="Direction">Parameter Direction: Input/ Output/ Return</param> public void AddDecimalPara(string Name, byte Scale, byte Precision, decimal?Value, QueryParameterDirection Direction) { SqlCeParameter oPara = new SqlCeParameter(Name, SqlDbType.Decimal); oPara.Precision = Precision; oPara.Scale = Scale; oPara.Direction = GetParaType(Direction); if (Value == null) { oPara.Value = DBNull.Value; } else { oPara.Value = Value; } this.oParameters.Add(oPara); }