public const string Unknown = "?"; //Unknown value public static DbType FromNative(NativeDbType aByte) { switch (aByte) { case NativeDbType.UnicodeChar: return(DbType.StringFixedLength); case NativeDbType.Char: return(DbType.AnsiStringFixedLength); case NativeDbType.Logical: return(DbType.Boolean); case NativeDbType.Numeric: return(DbType.Decimal); case NativeDbType.Date: return(DbType.Date); case NativeDbType.Float: return(DbType.Decimal); case NativeDbType.Memo: return(DbType.AnsiString); default: throw new DBFException( $"Unsupported Native Type {aByte}"); } }
public static Type TypeForNativeDBType(NativeDbType aType) { switch (aType) { case NativeDbType.Char: return(typeof(string)); case NativeDbType.Date: return(typeof(DateTime)); case NativeDbType.Numeric: return(typeof(decimal)); case NativeDbType.Logical: return(typeof(bool)); case NativeDbType.Float: return(typeof(float)); case NativeDbType.Memo: return(typeof(MemoValue)); default: throw new ArgumentException("Unsupported Type"); } }
public static Type TypeForNativeDBType(NativeDbType aType) { switch (aType) { case NativeDbType.Char: return(typeof(string)); case NativeDbType.Date: return(typeof(DateTime)); case NativeDbType.Numeric: return(typeof(decimal)); case NativeDbType.Logical: return(typeof(bool)); case NativeDbType.Float: return(typeof(decimal)); case NativeDbType.Memo: return(typeof(MemoValue)); default: return(typeof(Object)); } }
public const string Unknown = "?"; //Unknown value public static DbType FromNative(NativeDbType @byte) { switch (@byte) { case NativeDbType.Char: return(DbType.AnsiStringFixedLength); case NativeDbType.Logical: return(DbType.Boolean); case NativeDbType.Numeric: return(DbType.Decimal); case NativeDbType.Date: return(DbType.Date); case NativeDbType.Float: return(DbType.Decimal); case NativeDbType.Memo: return(DbType.AnsiString); default: return(DbType.Object); } }
public const string Unknown = "?"; //Unknown value static public DbType FromNative(NativeDbType aByte) { switch (aByte) { case NativeDbType.Char: return(DbType.AnsiStringFixedLength); case NativeDbType.Logical: return(DbType.Boolean); case NativeDbType.Numeric: return(DbType.Decimal); case NativeDbType.Date: return(DbType.Date); case NativeDbType.Float: // return DbType.Decimal; return(DbType.Double); case NativeDbType.Memo: return(DbType.AnsiString); case NativeDbType.Double: return(DbType.Double); default: throw new DBFException( string.Format("Unsupported Native Type {0}", aByte)); } }
public DBFField(string aFieldName, NativeDbType aType, Int32 aFieldLength) { Name = aFieldName; DataType = aType; FieldLength = aFieldLength; }
public DBFField(string fieldName, NativeDbType type, int fieldLength) { Name = fieldName; DataType = type; FieldLength = fieldLength; }
public DBFField(string aFieldName, NativeDbType aType, Int32 aFieldLength, Int32 aDecimalCount) { Name = aFieldName; DataType = aType; FieldLength = aFieldLength; DecimalCount = aDecimalCount; }
public DBFField(string fieldName, NativeDbType type, int fieldLength, int decimalCount) { Name = fieldName; DataType = type; FieldLength = fieldLength; DecimalCount = decimalCount; }
public static DbType FromNative(NativeDbType aByte) { switch (aByte) { case NativeDbType.Char: return DbType.AnsiStringFixedLength; case NativeDbType.Logical: return DbType.Boolean; case NativeDbType.Numeric: return DbType.Decimal; case NativeDbType.Date: return DbType.Date; case NativeDbType.Float: return DbType.Decimal; case NativeDbType.Memo: return DbType.AnsiString; default: throw new DBFException( string.Format("Unsupported Native Type {0}", aByte)); } }
public DBFField(string aFieldName, NativeDbType aType) { Name = aFieldName; DataType = aType; }
public static Type TypeForNativeDBType(NativeDbType aType) { switch(aType) { case NativeDbType.Char: return typeof (string); case NativeDbType.Date: return typeof (DateTime); case NativeDbType.Numeric: return typeof (decimal); case NativeDbType.Logical: return typeof (bool); case NativeDbType.Float: return typeof (float); case NativeDbType.Memo: return typeof (MemoValue); default: throw new ArgumentException("Unsupported Type"); } }
public DBFField(string fieldName, NativeDbType type) { Name = fieldName; DataType = type; }