Provides a set of uniform and portable data types that can be used between Microsoft Access, SQLServer and MySQL. Please refer to the DataTypeString function in the Source\SQL\SQLTable.vb file for the actual SQL equivalents for each database.

Namespace: DatabaseObjects.SQL
Assembly: DatabaseObjects (in DatabaseObjects.dll) Version: 3.8.1.0

Syntax

C#
public enum DataType
Visual Basic
Public Enumeration DataType
Visual C++
public enum class DataType

Members

Member nameValueDescription
TinyInteger0 Integer data from 0 through 255
SmallInteger1 Integer data from 2^15 (-32,768) through 2^15 - 1 (32,767)
Integer2 Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647)
BigInteger3 Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807)
Character4 SQLServer limitation: Fixed-length non-Unicode character data with a maximum length of 8,000 characters
UnicodeCharacter5 SQLServer limitation: Fixed-length Unicode data with a maximum length of 4,000 characters
VariableCharacter6 SQLServer limitation: Variable-length non-Unicode data with a maximum of 8,000 characters
UnicodeVariableCharacter7 SQLServer limitation: Variable-length Unicode data with a maximum length of 4,000 characters
Decimal8 Fixed precision and scale numeric data. Use the SQLTableField.Precision and SQLTableField.Scale properties.
Real9 Floating precision number data from -3.40E + 38 through 3.40E + 38. Equivalent to VB.NET Single data type. The MySQL equivalent used is FLOAT.
Float10 Floating precision number data from -1.79E + 308 through 1.79E + 308. Equivalent to .NET Double data type. The MySQL equivalent used is DOUBLE.
SmallMoney11 Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. The MySQL equivalent used is DECIMAL(10,4).
Money12 Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. The MySQL equivalent used is DECIMAL(19,4).
Boolean13 Integer data with either a 1 or 0 value
SmallDateTime14 SQL Server: Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute. This data type for Access and MySQL is equivalent to DATETIME.
DateTime15 Date and time data from January 1, 1753, through December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds. This is a SQLServer limitation. MySQL supports '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. To provide portability, accuracy to only 1 second can be assumed.
TimeStamp16
Text17 Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters
UnicodeText18 Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters
Binary19 SQLServer limitation: Fixed-length binary data with a maximum length of 8,000 bytes
VariableBinary20 SQLServer limitation: Variable-length binary data with a maximum length of 8,000 bytes
Image21 Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes
UniqueIdentifier22 A globally unique identifier that is guaranteed to always be unique.

See Also