A Field object has a Type property that can be set to one of the following 13 DAO property constants.
Type property constant | Microsoft Jet data type |
dbBoolean | Boolean (Yes/No) |
dbByte | Byte |
dbInteger | Integer |
dbLong | Long |
dbCurrency | Currency |
dbSingle | Single |
dbDouble | Double |
dbDate | Date/Time |
dbText | Text |
dbBinary | Binary |
dbLongBinary | Long Binary (OLE Object) |
dbMemo | Memo |
dbGUID | GUID (Number or AutoNumber) |
For a Field object in a Recordset object, the Type property is read-only. However, you must be aware of the Field object’s type when you are copying data to or from a field in code; otherwise, a type mismatch error may occur. For example, you cannot copy text data to a field with the Integer data type.
See Also For more information about equivalent DAO data types, see Appendix A, “Specifications.”
The Type property of a Field object in a Recordset object is determined by the underlying table from which the record was retrieved. If you created the table and its fields by using DAO DDL statements, you can easily determine the source table’s data type. However, if you’re retrieving data from tables created with Microsoft Jet SQL DDL statements or through the Microsoft Access user interface, the data type you specified when creating the table may not match one of the 13 DAO data types.
Note The GUID data type is used to store a globally unique identifier, which is a unique string of digits used to identify entities that need a unique reference identification, such as OLE objects and Microsoft SQL Server remote procedure calls. The GUID data type is also used in Microsoft Jet database applications to identify a replica; for example, the Database object’s ReplicaID property.