The following table shows the relationship between the base Advantage types (as they are used in SQL statements) and .NET framework types.
See ADT Field Types and Specifications or DBF Field Types and Specifications for field type specification details.
Advantage Client Engine Constant Name |
Advantage SQL Type Name |
.NET DbType |
.NET System Type |
ADS_LOGICAL = 1 |
logical |
DbType.Boolean |
System.Boolean |
ADS_NUMERIC = 2 |
numeric |
DbType.Decimal |
System.Decimal |
ADS_DATE = 3 |
date |
DbType.Date |
System.DateTime |
ADS_STRING = 4 |
char |
DbType.String |
System.String |
ADS_MEMO = 5 |
memo |
DbType.String |
System.String |
ADS_BINARY = 6 |
blob |
DbType.Binary |
System.Byte[] |
ADS_IMAGE = 7 |
blob |
DbType.Binary |
System.Byte[] |
ADS_DOUBLE = 10 |
double |
DbType.Double |
System.Double |
ADS_INTEGER = 11 |
integer |
DbType.Int32 |
System.Int32 |
ADS_SHORTINT = 12 |
short |
DbType.Int16 |
System.Int16 |
ADS_TIME = 13 |
time |
DbType.Time |
System.TimeSpan |
ADS_TIMESTAMP = 14 |
timestamp |
DbType.DateTime |
System.DateTime |
ADS_AUTOINC = 15* |
autoinc |
DbType.Int32 |
System.Int32 |
ADS_RAW = 16 |
raw |
DbType.Binary |
System.Byte[] |
ADS_CURDOUBLE = 17 |
curdouble |
DbType.Double |
System.Double |
ADS_MONEY = 18 |
money |
DbType.Currency |
System.Decimal |
ADS_CISTRING = 20 |
cistring |
DbType.String |
System.String |
ADS_ROWVERSION = 21 |
rowversion |
DbType.Int64 |
System.Int64 |
ADS_MODTIME = 22 |
modtime |
DbType.DateTime |
System.DateTime |
* Advantage stores auto-increment values as unsigned 32-bit integers. However, for .NET Common Language Specification (CLS) compliance, the Advantage .NET Data Provider does not expose unsigned integers. As a result, it reports auto-increment values as signed 32-bit integers. If you have auto-increment values in your tables that exceed 2,147,483,647, you will need to cast the value as an unsigned 32-bit integer or retrieve them as 64-bit integers (e.g., AdsDataReader.GetInt64).