■ Table 5-2 maps the DB2 data types to the .NET Framework types when no IANA code page is defined.
■ Table 5-3 maps the data types the data provider uses when a column is defined as character set 65535 and no IANA code page is defined.
■ Table 5-4 maps the data types the data provider uses when a column is defined as character set 65535 and an IANA code page is defined.
■ Table 5-5 maps the data types the data provider uses if only the System.Data.DbType is specified.
■ Table 5-6 shows the mapping that the data provider uses to infer a data type if the provider-specific type and the System.Data.DbType are not provided.
■ Table 5-7 shows the mapping that the data provider supports for the use of streams as inputs to Long data parameters.Table 5-2 maps the DB2 data types to the .NET Framework types when no IANA code page is defined. You can use the table to infer the data types that are used when a DataSet is filled using a DataAdapter. This table also identifies the accessors to use for accessing the data when a DataReader object is used directly.
As shown in Table 5-3, when the Charset For 65535 connection string option is set to the default value, an empty string, and the column is defined with a character set of 65535, the data provider uses different data types to return character data.
When the Charset For 65535 connection string option is set to a valid IANA code page name and the column is defined with a character set of 65535, the data provider uses different data types to return character data, as shown in Table 5-4. Columns defined as Char For Bit Data, Varchar For Bit Data, and Longvarchar For Bit Data are by definition created with a character set of 65535.
The type of the parameter is specific to each DataDirect Connect for ADO.NET data provider. The DB2 data provider must convert the parameter value to a native format before sending it to the server. The best way for an application to describe a parameter is to use the provider-specific type enumeration. In generic programming circumstances, the provider-specific type may not be available. In this situation, the data type must be inferred from either the System.Data.DbType or from the .NET Framework type of the parameter’s value.Table 5-5 shows the mapping that is used if only the System.Data.DbType is specified.
Table 5-6 shows the mapping that the data provider uses to infer a data type if the provider-specific type and the System.Data.DbType are not provided.
The DB2 data provider supports the use of streams as inputs to Long data parameters with the data types listed in Table 5-7.
Table 5-7. Data Types Supported With Stream Objects See “Using Streams as Input to Long Data Parameters” for more information about using streams.