public DataLogger_LogColumn(string sColumnName, MySql.Data.MySqlClient.MySqlDbType eMySqlType, int iDataTypeLength, bool bNullable, string sKey, string sDefault, string sExtras, RJBMySQLUtilities.DataLogging.Types.LogColumn.LogType? eLogType)
 {
     this._eDefinitionType = LogColumn.DefinitionType.Dynamic;
     this._ColumnName = sColumnName;
     this._oMySqlDBType = eMySqlType;
     this._DataTypeLength = iDataTypeLength;
     this._Nullable = bNullable;
     this._Key = sKey;
     this._Default = sDefault;
     this._LogType = eLogType;
     this._Extras = sExtras;
 }
 public DataLogger_LogColumn(string sColumnName, MySql.Data.MySqlClient.MySqlDbType eMySqlType, int iDataTypeLength, bool bNullable, string sKey, string sDefault, string sExtras, RJBMySQLUtilities.DataLogging.Types.LogColumn.LogType?eLogType)
 {
     this._eDefinitionType = LogColumn.DefinitionType.Dynamic;
     this._ColumnName      = sColumnName;
     this._oMySqlDBType    = eMySqlType;
     this._DataTypeLength  = iDataTypeLength;
     this._Nullable        = bNullable;
     this._Key             = sKey;
     this._Default         = sDefault;
     this._LogType         = eLogType;
     this._Extras          = sExtras;
 }
Пример #3
0
 /// <summary>
 /// Add a Parameter to current command object
 /// </summary>
 /// <param name="ParameterName">Parameter Name</param>
 /// <param name="DataType">Parameter Data Type</param>
 /// <param name="Value">Parameter Value</param>
 public void Add_Parameter(System.String ParameterName, MySql.Data.MySqlClient.MySqlDbType DataType, System.Object Value)
 {
     try
     {
         if (ParameterName.IndexOf("@") < 0)
         {
             ParameterName = "@" + ParameterName;
         }
         _MyCommand.Parameters.Add(ParameterName, DataType).Value = Value;
     }
     catch (MySql.Data.MySqlClient.MySqlException SqEx)
     {
         throw new System.Exception(SqEx.Message);
     }
     catch (System.Exception Ex)
     {
         throw new System.Exception(Ex.Message);
     }
 }
Пример #4
0
        private static SqlParameter MakeParam(string paramName, SqlDbType dbType, int size, ParameterDirection direction, object value)
        {
            SqlParameter param;

            if (size > 0)
            {
                param = new SqlParameter(paramName, dbType, size);
            }
            else
            {
                param = new SqlParameter(paramName, dbType);
            }

            param.Direction = direction;
            if (!(direction == ParameterDirection.Output && value == null))
            {
                param.Value = value == null ? DBNull.Value : value;
            }

            return(param);
        }
Пример #5
0
 public static SqlParameter MakeInParam(string paramName, SqlDbType dbType, object value)
 {
     return(MakeParam(paramName, dbType, 0, ParameterDirection.Input, value));
 }