Data Type Description

Attachment A field type to store a collection of files for a given record. Stored as a complex data field, the complex scalar fields expose three pieces of data: File Name, File Data (the file itself), and the File Type. Stored as a complex lookup into a hidden complex scalar table.

Table continues on next page

Data Type

Description

AutoNumber

Stored as 4-byte integer that is assigned automatically when the record is created. Can be assigned as consecutive or random values. If the AutoNumber is a Replication ID, it is stored as a 16-byte GUID, instead of an integer.

Currency

Stored as 8-byte number allowing numeric range of: -922,337,203,685,477.5808 to 922,337,203,685,477.5807. The number is scaled by 10,000 to give a fixed-point number, providing 15 digits to the left of the decimal point and 4 digits to the right.

Date/Time

Stored as IEEE 8-byte, floating-point number allowing a date range of 1 January 100 to 31 December 9999. The date may also include a time value range of: 0:00:00 to 23:59:59.

Hyperlink

A combination of text and numbers stored in a Memo field type to be used as a hyperlink address. The hyperlink can have four parts: Text to Display, Address, Sub Address, and Screen Tip.

Memo

Stores any number of characters up to the limit on the size of the database, 2GB. However, text box controls and the datasheet only allow adding or editing up to the first 63,999 characters stored in the field. You need to use code to work with more than 64,000 characters in a Memo field. Only the first 255 of these characters can be indexed or searched.

Number

Provides several numeric data types dictated by the Field Size property for this type. A number field can be either an integer or floating type numbers. Supported data types are Byte (1-byte integer), Integer (2-byte integer), Long (4-byte integer), Single (2-byte scaled floating point), Double (4-byte scaled floating point), Replication ID (16-byte GUID), and Decimal (12-byte scaled floating point). Number fields can be complex data fields.

OLE Object

Stores up to 1GB of OLE object data (such as a bitmap image, Word document, an Excel spreadsheet, or some other binary data) linked to or embedded in the field.

Text

Stores up to 255 characters of text, where the field length is dictated by the Field Size property for the field. The field can be indexed and is fully searchable. Text data type fields can be complex data fields.

Yes/No

Stores a 1-bit value of 0 or -1, but can also be formatted as Yes/No, On/Off, or True/False. The size of this data type is 1 byte.

Each data has its own unique purposes, some of which overlap, so be sure to choose the data types wisely. For example, both Text and Memo field types store text characters. Because both types are searchable up to 255 characters and the memo field can hold much more than 256 characters, you might assume that all strings should be stored in Memo fields. However, if that implementation were the case, database users might encounter performance issues when running queries against large sets of Memo field data, which could be avoided by using a Text field type instead. Be sure to completely analyze the data your application will need to store so that you can plan appropriately when designing the database tables.

If you want to track when a record for the new Assets table is created, you need to add a new field in the table called Created Date. Create a new field at the end of the table by typing Created Date in the

Field Name cell in the first empty row in the Table Designer. Then, for the Field Type, click the down arrow to expand the data type options and select Date/Time. Notice the Field Properties grid shown just below the list of Table Fields in the Table Designer. The Default Value property is a simple way to set the value for a field automatically when a record is created without having to write any code. For the Created Date field, set the Default Value property to the expression Now() to use the Now function (see Figure 1-6). Now, every time a new Assets record is created in the table, the Created Date value will be set to the current date and time.

Autodesk Civil 2018 Settings
Figure 1-6

Click the Close button in the top-right corner of the table and choose to save the changes. That's an example of how you use the Access Table Designer to create tables.

Was this article helpful?

0 0

Post a comment