The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DBD::TimesTen - TimesTen Driver for DBI

SYNOPSIS

  use DBI;

  $dbh = DBI->connect('dbi:TimesTen:DSN=...', 'user', 'password');

See DBI for more information.

DESCRIPTION

Notes:

An Important note about the tests!
 Please note that some tests may fail or report they are
 unsupported on this platform.
   
Private DBD::TimesTen Attributes
ttIgnoreNamedPlaceholders

Use this if you have special needs where :new or :name mean something special and are not just placeholder names. You must then use ? for binding parameters. Example:

        $dbh->{ttIgnoreNamedPlaceholders} = 1;
        $dbh->do("create trigger foo as if :new.x <> :old.x then ... etc");

Without this, DBD::TimesTen will think :new and :old are placeholders for binding and get confused.

ttDefaultBindType

This value defaults to 0, which means that DBD::TimesTen will attempt to query the driver via SQLDescribeParam to determine the correct type. This parameter is overridden if you supply a data type with the bind_param() call.

ttExecDirect

Force DBD::TimesTen to use SQLExecDirect instead of SQLPrepare() then SQLExecute. There are drivers that only support SQLExecDirect and the DBD::TimesTen do() override doesn't allow returning result sets. Therefore, the way to do this now is to set the attributed ttExecDirect.

There are currently two ways to get this: $dbh->prepare($sql, { ttExecDirect => 1}); and $dbh->{ttExecDirect} = 1;

When $dbh->prepare() is called with the attribute "ExecDirect" set to a non-zero value dbd_st_prepare do NOT call SQLPrepare, but set the sth flag ttExecDirect to 1.

ttQueryTimeout

This allows the end user to set a timeout for queries. You can either set this via the attributes parameter during the connect call, or you can directly modify the attribute using $dbh->{ttQueryTimeout} = 30 after you have already connected.

ttIsolationLevel

This allows the end user to set the isolation level. You may need to commit if you are changing isolation levels. You can either set this via the attributes parameter during the connect call, or you can directly modify the attribute using $dbh->{ttIsolationLevel} after you have already connected. You must export the symbols using as follows:

        use DBI;
        use DBD::TimesTen qw(:sql_isolation_options);

        $dbh = DBI->connect('DBI:TimesTen:DSN=...', undef, undef,
           { ttIsolationLevel => SQL_TXN_SERIALIZABLE });

The valid isolation levels are:

        SQL_TXN_READ_COMMITTED (default)
        SQL_TXN_SERIALIZABLE

   

Frequently Asked Questions

Answers to common DBI and DBD::TimesTen questions:

Almost all of my tests for DBD::TimesTen fail. They complain about not being able to connect or the DSN is not found.

Verify that you set DBI_DSN, DBI_USER, and DBI_PASS.

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 432:

You forgot a '=back' before '=head2'

Around line 436:

=over without closing =back