| Overview | Module | Function | Class | Tea 3.2.5 Reference Documentation © 2009 PDM&FC |
TConnection
Every TConnection starts its life with autocommit mode
turned on. See TConnection autocommit
for a more detailed explanation.
Before creating any instances of this class at least one JDBC driver
must have been previously successfully registered by a call to
tdbc-register-driver.
|
|
TConnection autocommit flag
Sets the autocommit mode for this TConnection
flag argument is true then every change in the
database made through a TStatement created
by this TConnection will be implicitly followed
by a TConnection commit. In this
mode it is not possible to to a rollback.
If the flag argument is false then changes to
the database made through a TStatement created
by this TConnection will require a call to
TConnection commit to become
permanent.
TConnection close
Closes the connection to the database.
TConnection that are still
open are automatically closed.
TConnection commit
Commits all the changes made to the database since the start of the transaction.
TConnection for which this method
was called.
TConnection was implicitly started when this
TConnection was created or at the last call
to the TConnection commit or
TConnection rollback methods.
A new transaction is implicitly started when this method
terminates successfully.
TConnection connect url [username password]
Opens a connection to a database.
username.
When a connection to the database is successfully established a database transaction transaction is also implicitly initiated.
The url identifying the database is dependent on the
type of database. You must consult the documentation for the JDBC
driver being used in order to specify a meaningful URL.
TConnection constructor [url [username password]]
Initializes the object and, optionally, opens a connection to a database.
username.
When a TConnection is instantiated a transaction is
also initiated.
The url identifying the database is dependent on the
type of database. You must consult the documentation for the JDBC
driver being used in order to specify a meaningful URL.
TConnection prepare sqlStatement
Creates a pre-compiled statement object.
sqlStatement.
sqlStatement argument.
You create a TPreparedStatement when you intend to execute multiple SQL statements that differ only in the values of certain parameters. Using a TPreparedStatement in situations as this may bring noticeable performance improvements.
TConnection prepareCall sqlStatement
Creates a pre-compiled statement object to execute stored procedures.
sqlStatement.
sqlStatement argument. You use a
TCallableStatement when executing stored
procedures in the database server.
TConnection rollback
Undoes all the changes made to the database since the start of the transaction.
TConnection for which this method
was called.
TConnection was implicitly started when this
TConnection was created or at the last call
to the TConnection commit or
TConnection rollback methods.
A new transaction is implicitly started when this method
terminates successfully.
TConnection statement
Creates a TStatement object in order to execute SQL statements.
| Overview | Module | Function | Class | Tea 3.2.5 Reference Documentation © 2009 PDM&FC |