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.SQLAssembly: 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 name | Value | Description | |
---|---|---|---|
TinyInteger | 0 | Integer data from 0 through 255 | |
SmallInteger | 1 | Integer data from 2^15 (-32,768) through 2^15 - 1 (32,767) | |
Integer | 2 | Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647) | |
BigInteger | 3 | Integer (whole number) data from -2^63 (-9223372036854775808) through 2^63-1 (9223372036854775807) | |
Character | 4 | SQLServer limitation: Fixed-length non-Unicode character data with a maximum length of 8,000 characters | |
UnicodeCharacter | 5 | SQLServer limitation: Fixed-length Unicode data with a maximum length of 4,000 characters | |
VariableCharacter | 6 | SQLServer limitation: Variable-length non-Unicode data with a maximum of 8,000 characters | |
UnicodeVariableCharacter | 7 | SQLServer limitation: Variable-length Unicode data with a maximum length of 4,000 characters | |
Decimal | 8 | Fixed precision and scale numeric data. Use the SQLTableField.Precision and SQLTableField.Scale properties. | |
Real | 9 | 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. | |
Float | 10 | Floating precision number data from -1.79E + 308 through 1.79E + 308. Equivalent to .NET Double data type. The MySQL equivalent used is DOUBLE. | |
SmallMoney | 11 | 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). | |
Money | 12 | 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). | |
Boolean | 13 | Integer data with either a 1 or 0 value | |
SmallDateTime | 14 | 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. | |
DateTime | 15 | 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. | |
TimeStamp | 16 | ||
Text | 17 | Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters | |
UnicodeText | 18 | Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters | |
Binary | 19 | SQLServer limitation: Fixed-length binary data with a maximum length of 8,000 bytes | |
VariableBinary | 20 | SQLServer limitation: Variable-length binary data with a maximum length of 8,000 bytes | |
Image | 21 | Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes | |
UniqueIdentifier | 22 | A globally unique identifier that is guaranteed to always be unique. |