Type Mapping
Telerik Data Access supports flexible mappings from .NET types (e.g., System.String) to database specific SQL types (e.g., VARCHAR on SQL Anywhere). The default mappings can be customized for a specific datastore. The mapping for specific fields can also be customized. Mappings are resolved by first using any information specified for the field, then looking up a generic type for the type of the field using the .NET Type Mapping, then converting this generic type into actual SQL type information using the Generic Type Mapping. You can have different mapping information for each database supported by Telerik Data Access.
The following table shows the default mapping from .NET types to SQL Anywhere specific types:
.NET Type | SQL Anywhere Type |
System.Boolean | BIT |
System.Char | CHAR(1) |
System.SByte | SMALLINT |
System.Byte | TINYINT |
System.Int16 | SMALLINT |
System.UInt16 | UNSINGNED SMALLINT |
System.Int32 | INTEGER |
System.UInt32 | UNSINGNED INT |
System.Int64 | BIGINT |
System.UInt64 | UNSINGNED BIGINT |
System.Single | REAL |
System.Double | DOUBLE |
System.String | VARCHAR(255) |
System.DateTime | TIMESTAMP |
System.Decimal | NUMERIC(32,6) |
System.Guid | UNIQUEIDENTIFIER |
Byte[] | LONG BINARY |