14. December 2006
Bob
FrontPage
Summary
Sometimes you want to know where the database column types values are obtained when looking at the database results auto-generated code, but there is no easy way of determining that information by looking at the database results code. This is because the database column types are defined as field types in the database definition. This blog lists those definitions.
More Information
There are two different places where the column/field types will be listed:
- In the ASP code =
fp_sColTypes
- In the WEBBOT code =
s-columntypes
Below is a list of the column/field types in an Access database:
Data Type |
Value |
AutoNumber - Long Integer |
3 |
AutoNumber - Replication ID |
72 |
Text |
202 |
Memo |
203 |
Number - Byte |
17 |
Number - Integer |
2 |
Number - Long Integer |
3 |
Number - Single |
4 |
Number - Double |
5 |
Number - Replication ID |
72 |
Number - Decimal |
131 |
Date/Time |
135 |
Currency - General Number |
6 |
Currency - Currency |
6 |
Currency - Euro |
6 |
Currency - Fixed |
6 |
Currency - Standard |
6 |
Currency - Percent |
6 |
Currency - Scientific |
6 |
Yes/No - True/False |
11 |
Yes/No - Yes/No |
11 |
Yes/No - On/Off |
11 |
OLE Object |
205 |
Hyperlink |
203 |
References
For more information on database field types, see the following Microsoft KB article:
This article contains the following section of code that lists several database column/field types:
* DEFINEs for field types - provided for reference only.
#DEFINE |
ADEMPTY |
0 |
#DEFINE |
ADTINYINT |
16 |
#DEFINE |
ADSMALLINT |
2 |
#DEFINE |
ADINTEGER |
3 |
#DEFINE |
ADBIGINT |
20 |
#DEFINE |
ADUNSIGNEDTINYINT |
17 |
#DEFINE |
ADUNSIGNEDSMALLINT |
18 |
#DEFINE |
ADUNSIGNEDINT |
19 |
#DEFINE |
ADUNSIGNEDBIGINT |
21 |
#DEFINE |
ADSINGLE |
4 |
#DEFINE |
ADDOUBLE |
5 |
#DEFINE |
ADCURRENCY |
6 |
#DEFINE |
ADDECIMAL |
14 |
#DEFINE |
ADNUMERIC |
131 |
#DEFINE |
ADBOOLEAN |
11 |
#DEFINE |
ADERROR |
10 |
#DEFINE |
ADUSERDEFINED |
132 |
#DEFINE |
ADVARIANT |
12 |
#DEFINE |
ADIDISPATCH |
9 |
#DEFINE |
ADIUNKNOWN |
13 |
#DEFINE |
ADGUID |
72 |
#DEFINE |
ADDATE |
7 |
#DEFINE |
ADDBDATE |
133 |
#DEFINE |
ADDBTIME |
134 |
#DEFINE |
ADDBTIMESTAMP |
135 |
#DEFINE |
ADBSTR |
8 |
#DEFINE |
ADCHAR |
129 |
#DEFINE |
ADVARCHAR |
200 |
#DEFINE |
ADLONGVARCHAR |
201 |
#DEFINE |
ADWCHAR |
130 |
#DEFINE |
ADVARWCHAR |
202 |
#DEFINE |
ADLONGVARWCHAR |
203 |
#DEFINE |
ADBINARY |
128 |
#DEFINE |
ADVARBINARY |
204 |
#DEFINE |
ADLONGVARBINARY |
205 |
#DEFINE |
ADCHAPTER |
136 |