Add(OracleNumberType,Int32,Int32,Type) Method
Creates a new instance of the
OracleNumberMapping class and adds it to the collection.
This sample demonstrates how to override default number mapping rules for the connection.
|
|---|
OracleConnection oracleConnection = new OracleConnection();
// Map NUMBER(10)..NUMBER(18) to Int64
oracleConnection.NumberMappings.Add(OracleNumberType.Integer, 10, 18, typeof(Int64));
// Map NUMBER(1) to Boolean
oracleConnection.NumberMappings.Add(OracleNumberType.Integer, 1, typeof(bool)); |
|
|---|
Dim oracleConnection as New OracleConnection
' Map NUMBER(10)..NUMBER(18) to Int64
oracleConnection.NumberMappings.Add(OracleNumberType.Integer, 10, 18, GetType(Int64))
' Map NUMBER(1) to Boolean
oracleConnection.NumberMappings.Add(OracleNumberType.Integer, 1, GetType(Boolean)) |