Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 DbType Enumeration

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
DbType Enumeration

Specifies the data type of a field, a property, or a Parameter object of a .NET Framework data provider.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)
Visual Basic (Declaration)
Public Enumeration DbType
Visual Basic (Usage)
Dim instance As DbType
C#
public enum DbType
Visual C++
public enum class DbType
JScript
public enum DbType
Member nameDescription
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkAnsiString A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkBinary A variable-length stream of binary data ranging between 1 and 8,000 bytes.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkByte An 8-bit unsigned integer ranging in value from 0 to 255.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkBoolean A simple type representing Boolean values of true or false.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkCurrency A currency value ranging from -2 63 (or -922,337,203,685,477.5808) to 2 63 -1 (or +922,337,203,685,477.5807) with an accuracy to a ten-thousandth of a currency unit.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDate A type representing a date value.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDateTime A type representing a date and time value.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDecimal A simple type representing values ranging from 1.0 x 10 -28 to approximately 7.9 x 10 28 with 28-29 significant digits.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDouble A floating point type representing values ranging from approximately 5.0 x 10 -324 to 1.7 x 10 308 with a precision of 15-16 digits.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkGuid A globally unique identifier (or GUID).
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkInt16 An integral type representing signed 16-bit integers with values between -32768 and 32767.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkInt32 An integral type representing signed 32-bit integers with values between -2147483648 and 2147483647.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkInt64 An integral type representing signed 64-bit integers with values between -9223372036854775808 and 9223372036854775807.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkObject A general type representing any reference or value type not explicitly represented by another DbType value.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkSByte An integral type representing signed 8-bit integers with values between -128 and 127.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkSingle A floating point type representing values ranging from approximately 1.5 x 10 -45 to 3.4 x 10 38 with a precision of 7 digits.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkString A type representing Unicode character strings.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkTime A type representing a time value.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkUInt16 An integral type representing unsigned 16-bit integers with values between 0 and 65535.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkUInt32 An integral type representing unsigned 32-bit integers with values between 0 and 4294967295.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkUInt64 An integral type representing unsigned 64-bit integers with values between 0 and 18446744073709551615.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkVarNumeric A variable-length numeric value.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkAnsiStringFixedLength A fixed-length stream of non-Unicode characters.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkStringFixedLength A fixed-length string of Unicode characters.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkXml A parsed representation of an XML document or fragment.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDateTime2 Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds.
Supported by the .NET Compact FrameworkSupported by the XNA FrameworkDateTimeOffset Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00.

The type of a parameter is specific to the .NET Framework data provider. Specifying the type converts the value of the Parameter to the data provider Type before passing the value to the data source. If the type is not specified, ADO.NET infers the data provider Type of the Parameter from the Value property of the Parameter object.

You can also generically specify the type of a Parameter by setting DbType property of a Parameter object.

ADO.NET cannot correctly infer the type if a byte array is larger than 8,000 bytes. Explicitly specify the DbType when working with byte arrays larger than 8,000 bytes.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0

XNA Framework

Supported in: 3.0, 2.0, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker