public SqlStoredProcedureParameter(DBStructure.INFORMATION_SCHEMA_PARAMETERSRow dr)
        {
            ColumnScale   = 0;
            ColumnLength  = 0;
            ParameterName = dr.PARAMETER_NAME;
            ParameterType = dr.DATA_TYPE;
            NativeType    = ParameterType;

            _sqlDbType = SqlTypeMapper.GetSqlDbType(dr.DATA_TYPE);
            Order      = Convert.ToInt32(dr.ORDINAL_POSITION);
            if (!dr.IsCHARACTER_MAXIMUM_LENGTHNull())
            {
                ColumnLength = dr.CHARACTER_MAXIMUM_LENGTH;
            }
            else if (!dr.IsNUMERIC_PRECISIONNull())
            {
                ColumnLength = Convert.ToInt64(dr.NUMERIC_PRECISION);
                if (!dr.IsNUMERIC_SCALENull())
                {
                    ColumnScale = dr.NUMERIC_SCALE;
                }
            }
            else if (!dr.IsDATETIME_PRECISIONNull())
            {
                ColumnLength = Convert.ToInt64(dr.DATETIME_PRECISION);
            }
        }
Ejemplo n.º 2
0
 protected override void LoadTypeInformation(string type)
 {
     _sqlDbType = SqlTypeMapper.GetSqlDbType(type);
     NativeType = type;
 }