Database.DataType

Description

A class that enumerates various database storage types.

This class' enumerations are used in binding parameters in a Database.PreparedStatement.

statement.bindParam(1, myValue, Database.DataType.SmallInt);

This set of available values corresponds closely with the ANSI standard SQL language's set of supported database storage types.

Methods

fromString Gets the data type value associated with the name of a storage type.

Static Properties

BigInt A 64-bit integer.
Bool A boolean 0 or 1 value.
Char A fixed length string.
Date A date value.
DateTime A date-time value.
Decimal A decimal value.
Double A double precision floating point value.
Float A variable precision floating point value.
Int A 32-bit integer generally 32-bit.
Interval A time interval value.
NChar A fixed length unicode string.
Numeric A numeric value.
NVarChar A variable length unicode string.
Real A 32-bit floating point value.
SmallInt A 16-bit integer.
Text A variable length string.
Time A time value.
Unknown An unknown data type.
VarChar A variable length string.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.fromString()

int fromString( string typeName )

Returns

int The data type value for the given name.

Description

Gets the data type value associated with the name of a storage type.

This can be used if you are querying the information schema of a database. In information schemas, field storage types are stored as strings such as "varchar" or "smallint". This method will interpret such a string an return the enumeration type value associated with it.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.BigInt

static readonly int BigInt

Description

A 64-bit integer.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Bool

static readonly int Bool

Description

A boolean 0 or 1 value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Char

static readonly int Char

Description

A fixed length string.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Date

static readonly int Date

Description

A date value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.DateTime

static readonly int DateTime

Description

A date-time value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Decimal

static readonly int Decimal

Description

A decimal value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Double

static readonly int Double

Description

A double precision floating point value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Float

static readonly int Float

Description

A variable precision floating point value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Int

static readonly int Int

Description

A 32-bit integer generally 32-bit.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Interval

static readonly int Interval

Description

A time interval value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.NChar

static readonly int NChar

Description

A fixed length unicode string.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Numeric

static readonly int Numeric

Description

A numeric value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.NVarChar

static readonly int NVarChar

Description

A variable length unicode string.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Real

static readonly int Real

Description

A 32-bit floating point value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.SmallInt

static readonly int SmallInt

Description

A 16-bit integer.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Text

static readonly int Text

Description

A variable length string.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Time

static readonly int Time

Description

A time value.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.Unknown

static readonly int Unknown

Description

An unknown data type.

Do no remove, this fixes the anchor on doc.flexsim.com

Database.DataType.VarChar

static readonly int VarChar

Description

A variable length string.