Data Types

Data Types

 The following data types are supported.

SQL Data Type

Equivalent .NET Data Type

bigint, int64, integer64

Int64

binary (size)

Byte[]

bit, bool

Boolean

char (size)

String
Char[]

datetime

DateTime

decimal (size)
decimal (size , length)

Decimal

float

Double

image

Byte[]

int, integer, int32

Int32

money

Decimal

nchar (size)

String,
Char[]

ntext

String
Char[]

numeric (size)
numeric (size , length)

Decimal

nvarchar (size)

String
Char[]

real, float32

Single

smalldatetime

DateTime

smallint, int16, integer16

Int16

smallmoney

Decimal

sql_variant

Object *

text

String
Char[]

timestamp

Byte[]

tinyint, int8, integer8

Byte

uniqueidentifier, guid

Guid

varbinary (size)

Byte[]

varchar (size)

String
Char[]

uint, uint32

UInt32

uint16

UInt16

uint64

UInt64

Null values are represented by the System.DBNull.Value.

Notes:

  • Data types encoded into a binary (byte[]) column by a commercial database like Oracle, or SQL-Server cannot be decoded by DataSet-SQL.
     
  • Datetime 0 for a commercial database may not be the same as DataSet-SQL
     
  • The default string representation of a datetime for a commercial database my not be the same as DataSet-SQL (SQL-Server:Jan 1 1900 12:00AM vs. .NET: 7/3/1901 12:00:00 AM)
     
  • DataSet-SQL ignores limiting a column of varchar(size) to size. Use char(10) to limit to size and pad the string with spaces.