[All]
InterBase 7.1 DataType to ADO.NET C# Type mappings
Abstract: InterBase 7.1 DataType to ADO.NET C# Type mappings
InterBase DataType to C# DataType Data conversion
Dialect 3 Datatype Mappings
The following table defines the bindings between InterBase SQL datatypes and C# Object Type mappings using the InterBase Borland Data Provider (BDP). All C# client applications should consider using this table for data retrieval methods.
InterBase Type |
BDP Type |
C# Type |
| BLOB TYPE 0 |
Blob |
System.Byte[] |
| BLOB TYPE 1 |
Blob |
System.Char[] |
| BLOB TYPE -1 |
Blob |
System.Byte[] |
| BLOB TYPE -2 |
Blob |
System.Byte[] |
| CHAR |
String |
System.String |
| VARCHAR |
String |
System.String |
| DATE |
Date |
System.DateTime |
| TIME |
Time |
System.DateTime |
| TIMESTAMP |
DateTime |
System.DateTime |
| BOOELAN** |
Not Supported |
Not Supported |
| SMALLINT |
Int16 |
System.Int16 |
| INTEGER |
Int32 |
System.Int32 |
| FLOAT |
Float |
System.Single |
| DOUBLE PRECISION |
Double |
System.Double |
| NUMERIC |
Decimal |
System.Decimal |
| DECIMAL |
Decimal |
System.Decimal |
** BOOLEAN is not yet supported by the BDP. If you need to BOOELAN type we recommend using a custom DOMAIN:
Option 1:
---------------
Create a field of type CHAR and use CHECK CONSTRAINTS to limit
the values that are allowed to be entered into it.
Example:
CHAR(1) CHECK (VALUE IN ("Y", "N")) NOT NULL;
Option 2:
----------------
Similar to above but use a domain to create a global data type for
the database so that you may reuse the data type more easily.
Example:
CREATE DOMAIN YN AS CHAR(1) CHECK(VALUE IN ("Y","N")) NOT NULL;