DBD::SQLAnywhere -- an Adaptive Server Anywhere interface for Perl 5. Portions Copyright (c) 1994,1995,1996 Tim Bunce Portions Copyright (c) 1996-2008 iAnywhere Solutions, 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.6.0 is recommended). It is very important to test it and install it! Build, test and install the DBI module (at least DBI 1.34 is recommended). It is very important to test it and install it! A SQLAnywhere client installation is *required* for building and deploying. A SQLAnywhere server install is recommended for building otherwise the "make test" portion of the build will fail. Remember to *read* the DBI README file! Building: On UNIX: [ Solaris, AIX, HP-UX, Linux, etc. ] source sa_config.sh (or sa_config.csh) from the SQLAnywhere installation perl Makefile.PL make copy demo.db from the SQLAnywhere installation directory to the current directory make test make install On Win32: [ requires Microsoft C and ActiveState's ActivePerl (www.activestate.com) ] NOTE: ActivePerl 5.6.0 build 616 or later is required. perl Makefile.PL nmake copy demo.db from the SQLAnywhere installation directory to the current directory nmake test nmake install 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: 1. SQLAnywhere connection parameters can be passed to DBD::SQLAnywhere by placing the list of parameters after 'DBI:SQLAnywhere:' in the first parameter to connect(). The connection parameters are specified as a list of LABEL=value pairs that are delimited by semicolons. If you are not familiar with SQLAnywhere connection parameters, *please* refer to the SQLAnywhere documentation. Example: $dbh = DBI->connect( 'DBI:SQLAnywhere:ENG=demo;UID=dba;PWD=sql', '', '' ); If the second parameter is nonblank, it is assumed to be a user name and UID=parameter2 will be appended to the SQLAnywhere connection string. Similarly, if the third parameter is nonblank, it is assumed to be a password and PWD=parameter3 will be appended to the SQLAnywhere connection string. The following is equivalent to the example above: $dbh = DBI->connect( 'DBI:SQLAnywhere:ENG=demo', 'dba', 'sql' ); 2. The SQLAnywhere DBD driver is thread-safe when using Perl ithreads. 3. Prepared statements are not dropped from the SQLAnywhere server until the statement handle is destroyed in the perl script. Calling finish() is not sufficient to drop the handle that the server is holding onto -- use "undef" instead or reuse the same perl variable for another handle. To help detect handle leaks in client applications, SQL Anywhere by default limits the number of prepared statements and cursors that any connection can hold at one time to 50 of each. If that limit is exceeded, a "Resource governor ... exceeded" error is reported. If you encounter this error, make sure you are dropping all of your statement handles and, if so, consult the SQLAnywhere documentation for the MAX_CURSOR_COUNT and MAX_STATEMENT_COUNT options. Be careful when using prepare_cached() since the cache will hold onto statement handles. --------------------------------------------------------------- Examples can be found in the 'eg' directory: connect.pl -> Demonstrates a simple connect. retrieve.pl -> Demonstrates retrieving data from a table and displaying the result set. blobs.pl -> Demonstrates the use of blobs For further examples, consult the test scripts located in the 't' directory.