OpenInteract2::Datasource::DBI

OpenInteract2::Datasource::DBI is a Perl module that can create DBI database handles.
Download

OpenInteract2::Datasource::DBI Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Winters
  • Publisher web site:
  • http://search.cpan.org/~cwinters/SPOPS-0.87/SPOPS/SQLInterface.pm

OpenInteract2::Datasource::DBI Tags


OpenInteract2::Datasource::DBI Description

OpenInteract2::Datasource::DBI is a Perl module that can create DBI database handles. OpenInteract2::Datasource::DBI is a Perl module that can create DBI database handles.SYNOPSIS # Define the parameters for a database handle 'main' using PostgreSQL type = DBI dbi_type = Pg dsn = dbname=urkelweb username = webuser password = urkelnut # Define a handle 'win32' that uses Microsoft SQL Server and connects # with ODBC type = DBI dbi_type = MSSQL use_odbc = yes dsn = MyDSN username = webuser password = urkelnut # Request the datasource 'main' from the context object (which in # turn requests it from the OpenInteract2::DatasourceManager object, # which in turn requests it from this class) my $dbh = CTX->datasource( 'main' ); my $sth = $dbh->prepare( "SELECT * FROM urkel_fan" ); $sth->execute; ...No, we do not subclass DBI with this. No, we do not override any of the DBI methods. Instead, we provide the means to connect to the database from one location using nothing more than a datasource name. This is somewhat how the Java Naming and Directory Interface (JNDI) allows you to manage objects, including database connections.Note that if you are using it this should work flawlessly (although pointlessly) with Apache::DBI, and if you are using this on a different persistent Perl platform (say, PerlEx) then this module gives you a single location from which to retrieve database handles -- this makes using the BEGIN/END tricks ActiveState recommends in their FAQ pretty trivial. Requirements: · Perl


OpenInteract2::Datasource::DBI Related Software