DBD-DBMaker

 view release on metacpan or  search on metacpan

html/dbd-dbmaker.html  view on Meta::CPAN

<HR>
<P>
<H1><A NAME="NAME">NAME</A></H1>
<P>
DBD::DBMaker - DBD driver to access DBMaker database

<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<P>
<PRE>  require DBI;
</PRE>
<P>
<PRE>  $dbh = DBI-&gt;connect('DBI:DBMaker:' . $database, $user, $pass);
  $dbh = DBI-&gt;connect($database, $user, $pass, 'DBMaker');
</PRE>
<P>
See the DBI module documentation for more information.

<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
This module is the low-level driver to access the DBMaker database using
the DBI interface. Please refer to the DBI documentation for using it.

<P>
<HR>
<H1><A NAME="The_DBI_Interface">The DBI Interface</A></H1>
<P>
This documentation describes driver specific behavior and restrictions, and
a brief description of each method and attribute. It is not supposed to be
used as the only reference for the user. In any case consult the DBI
documentation first !

<P>
<HR>
<H2><A NAME="The_DBI_Class_Methods">The DBI Class Methods</A></H2>
<DL>
<DT><STRONG><A NAME="item_connect">connect</A></STRONG><DD>
<P>
Establishes a connection to a database server

<P>
To connect to a database with a minimum of parameters, use the following
syntax: 

<P>
<PRE>  $dbh = DBI-&gt;connect('DBI:DBMaker:$dbname', $user, $pass);
  $dbh = DBI-&gt;connect($dbname, $user, $pass, 'DBMaker');
</PRE>
<P>
Or you can set environment variable DBI_DSN, DBI_USER, DBI_PASS and use the
following syntax:

<P>
The DBI environment variable:

<P>
<PRE>  In CSH,TCSH
  setenv DBI_DSN 'dbi:DBMaker:DBNAME'
  setenv DBI_USER 'SYSADM'
  setenv DBI_PASS ''
 
  In SH, BASH
  export DBI_DSN='dbi:DBMaker:DBNAME'
  export DBI_USER='SYSADM'
  export DBI_PASS=''
 
  $dbh = DBI-&gt;connect();
</PRE>
<P>
If you cannot connect to the specified $dbname, please check if related
database config is located at the following path or not. For detail setting
for DBMaker's database config please reference DBMaker's DBA manual. 

<P>
The search order for DBMaker's config file (dmconfig.ini) is listed as
follows:

<P>
<PRE>  (1) Your local directory which you run your perl program.
  (2) DBMAKER environment variable for indicating where your 
      dmconfig.ini located.
  (3) ~dbmaker/data
</PRE>
<P>
If you want your database to be able to be accessed by others, you can
append your database section to ~dbmaker/data/dmconfig.ini by editor. Or
you can tell user to append the database section in their local
dmconfig.ini.

<DT><STRONG><A NAME="item_disconnect">disconnect</A></STRONG><DD>
<P>
Disconnects from the database server.

<P>
<PRE>  Usage:
  $rc = $dbh-&gt;disconnect();  
</PRE>
<DT><STRONG><A NAME="item_data_sources">data_sources</A></STRONG><DD>
<P>
Returns a list of all data sources (databases) available via the DBMaker
driver. The search order is same as the search for DBMaker's dmconfig.ini
file.

<P>
<PRE>  Example:  For list all database avaiable for DBMaker
  my @ary =DBI-&gt;data_sources(&quot;DBMaker&quot;);
  my $i=0;
  print &quot;Show a list of all data sources availabled via the DBMaker:\n&quot;;
  while($ary[$i]){
    print &quot;$ary[$i]\n&quot;;
    $i=$i+1;
  }
</PRE>
<P>
The following DBI class method are handled by the DBI, no driver-specific
impact.

<DT><STRONG><A NAME="item_available_drivers">available_drivers</A></STRONG><DD>
<P>
Returns a list of all available drivers by searching for DBD::* modules



( run in 0.387 second using v1.01-cache-2.11-cpan-39bf76dae61 )