Esempio n. 1
0
 internal MySqlParameter(string name, Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType type, ParameterDirection dir, string col, DataRowVersion ver, object val) : this(name, type)
 {
     this.direction     = dir;
     this.sourceColumn  = col;
     this.sourceVersion = ver;
     this.Value         = val;
 }
Esempio n. 2
0
 public MySqlParameter(string parameterName, Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType dbType, int size, string sourceColumn) : this(parameterName, dbType)
 {
     this.size          = size;
     this.direction     = ParameterDirection.Input;
     this.sourceColumn  = sourceColumn;
     this.sourceVersion = DataRowVersion.Current;
 }
Esempio n. 3
0
 public MySqlParameter(string parameterName, Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, object value) : this(parameterName, dbType, size, sourceColumn)
 {
     this.direction     = direction;
     this.sourceVersion = sourceVersion;
     this.Value         = value;
 }
Esempio n. 4
0
 public MySqlParameter(string parameterName, Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType dbType, int size) : this(parameterName, dbType)
 {
     this.size = size;
 }
Esempio n. 5
0
 public MySqlParameter(string parameterName, Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType dbType) : this(parameterName, null)
 {
     this.MySqlDbType = dbType;
 }
Esempio n. 6
0
        private void SetMySqlDbType(Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType mysql_dbtype)
        {
            this.mySqlDbType = mysql_dbtype;
            switch (this.mySqlDbType)
            {
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Decimal:
                this.dbType = System.Data.DbType.Decimal;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Byte:
                this.dbType = System.Data.DbType.SByte;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int16:
                this.dbType = System.Data.DbType.Int16;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int32:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int24:
                this.dbType = System.Data.DbType.Int32;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Float:
                this.dbType = System.Data.DbType.Single;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Double:
                this.dbType = System.Data.DbType.Double;
                return;

            case (Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Float | Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int16):
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.VarString:
            case ((Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType) 0x1f8):
            case ((Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType) 0x1f9):
            case ((Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType) 0x1fa):
            case ((Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType) 0x1fb):
                break;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Timestamp:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.DateTime:
                this.dbType = System.Data.DbType.DateTime;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int64:
                this.dbType = System.Data.DbType.Int64;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Date:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Year:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Newdate:
                this.dbType = System.Data.DbType.Date;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Time:
                this.dbType = System.Data.DbType.Time;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Bit:
                this.dbType = System.Data.DbType.UInt64;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Enum:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Set:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.VarChar:
                this.dbType = System.Data.DbType.String;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.TinyBlob:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.MediumBlob:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.LongBlob:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Blob:
                this.dbType = System.Data.DbType.Object;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.String:
                this.dbType = System.Data.DbType.StringFixedLength;
                break;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UByte:
                this.dbType = System.Data.DbType.Byte;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt16:
                this.dbType = System.Data.DbType.UInt16;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt32:
            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt24:
                this.dbType = System.Data.DbType.UInt32;
                return;

            case Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt64:
                this.dbType = System.Data.DbType.UInt64;
                return;

            default:
                return;
            }
        }
Esempio n. 7
0
        private void SetDbType(System.Data.DbType db_type)
        {
            this.dbType = db_type;
            switch (this.dbType)
            {
            case System.Data.DbType.AnsiString:
            case System.Data.DbType.Guid:
            case System.Data.DbType.String:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.VarChar;
                return;

            case System.Data.DbType.Byte:
            case System.Data.DbType.Boolean:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UByte;
                return;

            case System.Data.DbType.Currency:
            case System.Data.DbType.Decimal:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Decimal;
                return;

            case System.Data.DbType.Date:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Date;
                return;

            case System.Data.DbType.DateTime:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.DateTime;
                return;

            case System.Data.DbType.Double:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Double;
                return;

            case System.Data.DbType.Int16:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int16;
                return;

            case System.Data.DbType.Int32:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int32;
                return;

            case System.Data.DbType.Int64:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Int64;
                return;

            case System.Data.DbType.SByte:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Byte;
                return;

            case System.Data.DbType.Single:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Float;
                return;

            case System.Data.DbType.Time:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Time;
                return;

            case System.Data.DbType.UInt16:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt16;
                return;

            case System.Data.DbType.UInt32:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt32;
                return;

            case System.Data.DbType.UInt64:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.UInt64;
                return;

            case System.Data.DbType.AnsiStringFixedLength:
            case System.Data.DbType.StringFixedLength:
                this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.String;
                return;
            }
            this.mySqlDbType = Shaiya.Extended.Server.MySql.Data.MySqlClient.MySqlDbType.Blob;
        }