DBD::ASAny -- an Adaptive Server Anywhere interface for Perl 5. Portions Copyright (c) 1994,1995,1996 Tim Bunce Portions Copyright (c) 1996,1998,1999,2000 Sybase Inc. For license information, please see license.txt included in this distribution. *BEFORE* BUILDING, TESTING AND INSTALLING this you will need to: Build, test and install Perl 5 (at least 5.002beta2). It is very important to test it and install it! Build, test and install the DBI module (at least DBI 1.13). It is very important to test it and install it! Remember to *read* the DBI README file! Building: On UNIX: [ Solaris, AIX, HP-UX, Linux ] perl Makefile.PL make make test make install On Win32: [ requires Microsoft C and ActiveState's ActivePerl (www.activestate.com) ] perl Makefile.PL nmake nmake test nmake install The regression tests are minimal at the moment so don't necessarily believe all is fine if the tests succeed... Do NOT hand edit the generated Makefile unless you are completely sure you understand the implications! Always try to make changes via the Makefile.PL command line and/or editing the Makefile.PL. Notes: 0. The ASAny DBD driver is NOT supported by Sybase technical support. If you have difficulties, please try to solve them yourself *before* you contact the author (smirnios@sybase.com). If you make additions, improvements or bug fixes, please let the author know so that the changes can be incorporated into the next version. 1. The connect() method for Adaptive Server Anywhere ignores the password and dbname fields. The uid field provides the full connection string. For example: $dbh = DBI->connect( '', 'UID=dba;PWD=sql;ENG=asademo', '', 'ASAny' ); 2. Before running 'make test', a copy of the asademo.db file located in the ASA directory should be in your current directory. There have been problems autostarting and autostopping engines in rapid succession on UNIX. If you encounter a problem autostarting the engine, start the engine on asademo.db before running the tests. 3. The ASAny DBD driver should now be thread-safe; however, simple multi-threaded tests can easily crash perl. It is suspected that the current implementation of Perl threads and/or DBI in a threaded environment is the cause of the instability, not the driver. So what is implemented? Lets take the list at the bottom of DBI.pm: $dbh = DBI->connect($data_source, $username, $auth); $dbh = DBI->connect($data_source, $username, $auth, \%attr); $rc = $dbh->disconnect; $rv = $dbh->do($statement); $rv = $dbh->do($statement, \%attr); %attr is ignored $rv = $dbh->do($statement, \%attr, @bind_values); %attr is ignored $sth = $dbh->prepare($statement); $sth = $dbh->prepare($statement, \%attr); %attr is ignored $rc = $sth->bind_col($col_num, \$col_variable); $rc = $sth->bind_columns(\%attr, @list_of_refs_to_vars_to_bind); $rv = $sth->bind_param($param_num, $bind_value); $rv = $sth->bind_param($param_num, $bind_value, $bind_type); $rv = $sth->bind_param($param_num, $bind_value, \%attr); $rv = $sth->execute; $rv = $sth->execute(@bind_values); @row_ary = $sth->fetchrow_array; $ary_ref = $sth->fetchrow_arrayref; $hash_ref = $sth->fetchrow_hashref; $rc = $sth->finish; $rv = $sth->rows; $rc = $dbh->commit; $rc = $dbh->rollback; $sql = $dbh->quote($string); $rc = $h->err; $str = $h->errstr; $rv = $h->state; Not supported $sth->{NAME} (\@) Yes $sth->{NULLABLE} (\@) No $sth->{TYPE} (\@) No $sth->{PRECISION} (\@) No $sth->{SCALE} (\@) No $sth->{NUM_OF_FIELDS} ($) Yes $sth->{NUM_OF_PARAMS} ($) Yes --------------------------------------------------------------- There are two examples in the 'eg' directory. connect.pl -> Demonstrates a simple connect. retrieve.pl -> Demonstrates retrieving data from a table and displaying the result set. For further examples, consult the test scripts located in the 't' directory.