Table of contents
XML
TOC
Collapse the table of content
Expand the table of content

Comparison of Data Types

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The Access database engine recognizes several overlapping sets of data types. In Access, there are four different contexts in which you may need to specify a data type — in table Design view, in the Query Parameters dialog box, in Visual Basic, and in SQL view in a query.

The following table compares the five sets of data types that correspond to each context. The first column lists the Type property settings available in table Design view and the five FieldSize property settings for the Number data type. The second column lists the corresponding query parameter data types available for designing parameter queries in the Query Parameters dialog box. The third column lists the corresponding Visual Basic data types. The fourth column lists ADO Field object data types. The fifth column lists the corresponding Jet database engine SQL data types defined by the Access database engine along with their valid synonyms.

Table fieldsQuery parametersVisual BasicADO Data Type property constantsAccess database engine SQL and synonyms
Not supportedBinaryNot supportedadBinary

BINARY (See Notes)

(Synonym: VARBINARY)

Yes/NoYes/NoBooleanadBoolean

BOOLEAN

(Synonyms: BIT, LOGICAL, LOGICAL1, YESNO)

Number

( FieldSize = Byte)

ByteByteadUnsignedTinyInt

BYTE

(Synonym: INTEGER1)

AutoNumber

( FieldSize = Long Integer)

Long IntegerLongadInteger

COUNTER

(Synonym: AUTOINCREMENT)

CurrencyCurrencyCurrencyadCurrency

CURRENCY

(Synonym: MONEY)

Date/TimeDate/TimeDateadDate

DATETIME

(Synonyms: DATE, TIME, TIMESTAMP)

Number

( FieldSize = Double)

DoubleDoubleadDouble

DOUBLE

(Synonyms: FLOAT, FLOAT8, IEEEDOUBLE, NUMBER, NUMERIC)

AutoNumber /GUID

( FieldSize = Replication ID)

Replication IDNot supportedadGUIDGUID

Number

( FieldSize = Long Integer)

Long IntegerLongadInteger

LONG (See Notes)

(Synonyms: INT, INTEGER, INTEGER4)

OLE ObjectOLE ObjectStringadLongVarBinary

LONGBINARY

(Synonyms: GENERAL, OLEOBJECT)

MemoMemoStringadLongVarWChar

LONGTEXT

(Synonyms: LONGCHAR, MEMO, NOTE)

Number

( FieldSize = Single)

SingleSingleadSingle

SINGLE

(Synonyms: FLOAT4, IEEESINGLE, REAL)

Number

( FieldSize = Integer)

IntegerIntegeradSmallInt

SHORT (See Notes)

(Synonyms: INTEGER2, SMALLINT)

TextTextStringadVarWChar

TEXT

(Synonyms: ALPHANUMERIC, CHAR, CHARACTER, STRING, VARCHAR)

HyperlinkMemoStringadLongVarWChar

LONGTEXT

(Synonyms: LONGCHAR, MEMO, NOTE)

Not supportedValueVariantadVariantVALUE (See Notes)
Note
  • Access itself doesn't use the BINARY data type. It's recognized only for use in queries on linked tables from other database products that support the BINARY data type.
  • The INTEGER data type in the Access database engine SQL doesn't correspond to the Integer data type for table fields, query parameters, or Visual Basic. Instead, in SQL, the INTEGER data type corresponds to a Long Integer data type for table fields and query parameters and to a Long data type in Visual Basic.
  • The VALUE reserved word doesn't represent a data type defined by the Access database engine. However, in Access or SQL queries, the VALUE reserved word can be considered a valid synonym for the Visual Basic Variant data type.
  • If you are setting the data type for a DAO object in Visual Basic code, you must set the object's Type property.
© 2018 Microsoft