Overview
TankardSoft 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.
It implements the required ADO.NET interfaces and developers can build applications using their choice of .NET languages.
Current release version is 6.0.0.7 - for Timesten 6, and 7.0.0.7 for TimesTen 7.
Installation packadge includes direct-linked and client-server versions of product.
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. TankardSoft 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.
TankardSoft 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 string attributes
| Attribute |
Default value |
Description |
| PoolSize |
10 |
Maximum number of connection in a pool. Pooling disabled if PoolSize = 0 |
| IdleTime |
60000 |
LifeTime for unused connection in pool |
| Validate |
true |
Validate connection coming out of the pool |
| Enlist |
true |
Enlists transaction in context of System.Transaction (use TransactionScope technique) |
| Timeout |
0 |
Maximum time (in seconds) to wait for a free connection from the pool. |
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 connection 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.
TTCommand class, executing SQL
The TTCommand class represents SQL statements executed on Oracle TimesTen Database.
TTCommand class also supports parameters binding using TTParameter class.
TTType enumerated values are used to explicitly specify type of value for a TTParameter object.
TTType enumeration:
| TTType member name |
TimesTen datatype |
| Int16 |
SMALLINT |
| Int32 |
INTEGER |
| Float |
4-byte REAL |
| Double |
8-byte FLOAT |
| Char |
CHAR |
| VarChar |
VARCHAR |
| Binary |
BINARY |
| VarBinary |
VARBINARY |
| Numeric |
DECIMAL |
| NChar |
NCHAR |
| NVarChar |
NVARCHAR |
| Date |
DATE |
| Time |
TIME |
| DateTime |
TIMESTAMP |
| Byte |
TINYINT |
| Int64 |
BIGINT |
TTDataReader class, obtaining data
The ExecuteReader method of the TTCommand class returns a TTDataReader object, which is read-only, forward-only result set.
TTDataReader types acccessors:
| TimesTen datatype |
.NET datatype |
Accessor |
| CHAR |
System.String |
GetString |
| VARCHAR |
System.String |
GetString |
| NCHAR |
System.String |
GetString |
| NVARCHAR |
System.String |
GetString |
| SMALLINT |
System.Int16 |
GetInt16 |
| INTEGER |
System.Int32 |
GetInt32 |
| 4-byte REAL |
System.Single |
GetFloat |
| 8-byte FLOAT |
System.Double |
GetDouble |
| TINYINT |
System.Byte |
GetByte |
| BIGINT |
System.Int64 |
GetInt64 |
| DECIMAL |
System.Decimal |
GetDecimal |
| DATE |
System.DateTime |
GetDateTime |
| TIME |
System.TimeSpan |
GetTime |
| TIMESTAMP |
System.DateTime |
GetDateTime |
| BINARY |
System.Byte[] |
GetBytes |
| VARBINARY |
System.Byte[] |
GetBytes |
Up