.NET 2.0 Data Provider for Oracle® TimesTen®
Data Provider is ADO.NET 2.0 data provider for Oracle TimesTen database, it provides functionality for connecting to TimesTen database, executing commands and retrieving results.
Features
There are classes that make up .NET data provider. These classes can be used by any .NET 2.0 application written in any .NET 2.0 language, for example, C#, managed C++, Visual Basic .NET etc.
Data Provider can be used in the same way as the MS SQL Server .NET or Oracle .NET data provider.
- TTConnection - Establishes a connection to TimesTen database and can begin transaction.
- TTCommand - Executes SQL statements at TimesTen database.
- TTDataReader - Provides a forward-only stream of data (cursor) from TimesTen database.
- TTTransaction - Enlists commands in transactions at TimesTen database.
- TTParameter - Defines input parameters for SQL statements.
- TTException - Returned when an error is encountered during database interaction.
Data Provider also supports some important features (especially for ASP.NET developers):
- Connection pooling - sets up a pool of connections for an application, allowing connection lifetime, minimum and maximum pool size to be set.
- Connection validation - connection pooler detects the severed connections and marks its as invalid.
- TransactionScope (.NET 2.0 specific transaction technique).
Connection pooling
When connection pooling is enabled (the default), the Open and Close methods of the TTConnection object implicitly use the connection pooling service, which is responsible for pooling and returning connections to the application.
The connection pooling service creates connection pools by using the ConnectionString property as a key, to uniquely identify a pool. If there is no existing pool with the exact attribute values as the ConnectionString property, the connection pooling service creates a new connection pool. If a pool already exists with the requested key, a connection is returned to the application from that pool.
The PoolSize attribute of the ConnectionString property sets the maximum number of connections for a connection pool. If a new connection is requested, but no connections are available and the limit for PoolSize has been reached, then the connection pooling service waits for the time defined by the Timeout attribute. If the Timeout time has been reached, and there are still no connections available in the pool, the onnection pooling service raises an exception indicating that the connection pool request has timed-out.
The Validate attribute validates connections coming out of the pool. This attribute should be used only when necessary, because it causes a round-trip to the database to validate each connection immediately before it is provided to the application.
TimesTen datatypes Supported datatypes list:
public enum TTType
Int16 = 1, // SMALLINT
Int32 = 2, // INTEGER
Float = 3, // 4-byte REAL
Double = 4, // 8-byte FLOAT
Char = 5, // CHAR
VarChar = 6, // VARCHAR
Binary = 7, // BINARY
VarBinary = 8, // VARBINARY
Numeric = 11, // DECIMAL
NChar = 12, // NCHAR
NVarChar = 13, // NVARCHAR
Date = 14, // DATE
Time = 15, // TIME
DateTime = 16, // TIMESTAMP
Byte = 20, // TINYINT
Int64 = 21 // BIGINT