DBD::Sqlflex

Access to Sqlflex Databases
Download

DBD::Sqlflex Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gerard Menicucci
  • Publisher web site:
  • http://search.cpan.org/~infoflex/

DBD::Sqlflex Tags


DBD::Sqlflex Description

Access to Sqlflex Databases DBD::Sqlflex is a Perl module that offers access to Sqlflex databases.USE OF DBD::SqlflexLoading DBD::SqlflexTo use the DBD::Sqlflex software, you need to load the DBI software. use DBI;Under normal circumstances, you should then connect to your database using the notation in the section "CONNECTING TO A DATABASE" which calls DBI->connect(). Note that some of the DBD::Sqlflex test code does not operate under normal circumstances, and therefore uses the non-preferred techniques in the section "Driver Attributes and Methods".Driver Attributes and MethodsIf you have a burning desire to do so, you can explicitly install the Sqlflex driver independently of connecting to any database using: $drh = DBI->install_driver('Sqlflex');This gives you a reference to the driver, aka the driver handle. If the load fails, your program stops immediately (unless, perhaps, you eval the statement).Once you have the driver handle, you can interrogate the driver for some basic information: print "Driver Information "; # Type is always 'dr'. print " Type: $drh->{Type} "; # Name is always 'Sqlflex'. print " Name: $drh->{Name} "; # Version is the version of DBD::Sqlflex (eg 0.50). print " Version: $drh->{Version} "; # The Attribution identifies the culprits who provided you # with this software. print " Attribution: $drh->{Attribution} "; # ProductName is the version of ESQL/C; it corresponds to # the first line of the output from "esql -V". print " Product: $drh->{ix_ProductName} "; # ProductVersion is an integer version number such as 721 # for ESQL/C version 7.21.UC1. print " Product Version: $drh->{ix_ProductVersion} "; # MultipleConnections indicates whether the driver # supports multiple connections (1) or not (0). print " Multiple Connections: $drh->{ix_MultipleConnections} "; # ActiveConnections identifies the number of open connections. print " Active Connections: $drh->{ix_ActiveConnections} "; # CurrentConnection identifies the current connection. print " Current Connections: $drh->{ix_CurrentConnection} ";Once you have the driver loaded, you can connect to a database, or you can sever all connections to databases with disconnect_all. $drh->disconnect_all;You can find out which databases are available using the function: @dbnames = DBI->data_sources('Sqlflex');Note that you may be able to connect to still other databases using other notations (eg, you can probably connect to "dbase@server" if "server" appears in the sqlhosts file and the database "dbase" exists on the server and the server is up and you have permission to use the server and the database on the server and so on). Also, you may not be able to connect to every one of the databases listed if you have not been given connect permission on the database. However, the list provided by the DBI->data_sources method certainly exist and it is legitimate to try connecting to them.You can test whether this worked with: if (defined @dbnames) { ...process array... } else { ...process error... }See also test file "t/dblist.t". Requirements: · Perl


DBD::Sqlflex Related Software