Mapping type |
.NET type |
System.Data.DbType |
Int16 |
System.Int16 |
DbType.Int16 |
Int32 |
System.Int32 |
DbType.Int32 |
Int64 |
System.Int64 |
DbType.Int64 |
Single |
System.Single |
DbType.Single |
Double |
System.Double |
DbType.Double |
Decimal |
System.Decimal |
DbType.Decimal |
String |
System.String |
DbType.String |
AnsiString |
System.String |
DbType.AnsiString |
Byte |
System.Byte |
DbType.Byte |
Char |
System.Char |
DbType.StringFixedLength—one character |
AnsiChar |
System.Char |
DbType.AnsiStringFixedLength—one character |
Boolean |
System.Boolean |
DbType.Boolean |
Guid |
System.Guid |
DbType.Guid |
PersistentEnum |
System.Enum(an enumeration) |
DbType for the underlying value |
TrueFalse |
System.Boolean |
DbType.AnsiStringFixedLength—either 'T' or 'F' |
YesNo |
System.Boolean |
DbType.AnsiStringFixedLength—either 'Y' or 'N' |
DateTime |
DateTime |
DbType.DateTime—ignores milliseconds |
Ticks |
System.DateTime |
DbType.Int64 |
TimeSpan |
System.TimeSpan |
DbType.Int64 |
Timestamp |
System.DateTime |
DbType.DateTime—as specific as the database supports |
Binary |
System.Byte[] |
DbType.Binary |
BinaryBlob |
System.Byte[] |
DbType.Binary |
StringClob |
System.String |
DbType.String |
Serializable |
Any System.Object marked with SerializableAttribute |
DbType.Binary |
CultureInfo |
System.Globalization.CultureInfo |
DbType.String—five characters for culture |
Type |
System.Type |
DbType.String holding the Assembly Qualified Name |