---
name: "DBD::SQLRelay"
section: "3pm"
platform: "linux"
package: "libdbd-sqlrelay-perl"
version: "1:0.39.4-6"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/DBD::SQLRelay"
---

# DBD::SQLRelay(3pm)

DBD::SQLRelay - perl DBI driver for SQL Relay use DBD::SQLRelay; my `$dbh` = DBI -\> connect ('dbi:SQLRelay:$dsn', `$login`, `$password`); This module is a pure-Perl DBI binding to SQL Relay's native API.  Connection string consists of following parts: Once connected, DB handler works as usual (see DBI). Don't ever try to share one SQLRelay connect by multiple scripts, for example, if you use  Apache mod\_perl. Every `$dbh` holds one of server connections, so call *disconnect()* directly at the end of every script and don't use Apache::DBI or SQLRelay will be deadlocked.\
 **Note for HTML::Mason Users** If you use HTML::Mason, your handler.pl sould look like this:

```
  ...
     {
       package HTML::Mason::Commands;
       use DBI;
       use vars qw($db);
     }

  ...
     sub handler {

       $HTML::Mason::Commands::dbh = DBI -> connect (...);

       my $status = $ah -> handle_request (...);

       $HTML::Mason::Commands::dbh -> disconnect;

       return $status;

     }
```

D. E. Ovsyanko, do@mobile.ru Contributions by: Erik Hollensbe \<erik@hollensbe.org\> Tony Fleisher \<tfleisher@musiciansfriend.com\> http://www.firstworks.com Hey! **The above document had some coding errors, which are explained below:** '=item' outside of any '=over' You forgot a '=back' before '=head1'
