NAME

Sybase::FAQ -- The Frequently Asked Questions for Sybase access from Perl.


SYNOPSIS

    perldoc Sybase::FAQ


DESCRIPTION

This document serves to answer the most frequently asked questions on the sybperl-l mailing list.


Basic Information & Information Sources

1.1 What is sybperl, DBD::Sybase, ...

sybperl is the collective name for a set of perl modules that provide access to the Sybase Open Client API. It was originally released in September 1991 as an add-on to perl 4.xx, and has since been re-written for perl 5 (around 1995).

DBD::Sybase is a driver module for DBI - see http://search.cpan.org/~timb/DBI-1.40/DBI.pm.

1.2 Mailing lists

The sybperl and DBD::Sybase modules are supported via the sybperl-l@peppler.org mailing list. You can subscribe to the mailing list by sending an email with ``subscribe'' in the body to sybperl-l-request@peppler.org. The mailing list is archived and searchable at http://www.peppler.org/archive.


Installing

2.1 Basic Installation Information

Before installing sybperl or DBD::Sybase you need to have the Sybase Open Client libraries available. The installation scripts look for these files using the SYBASE and SYBASE_OCS environment variables. The easiest way to install sybperl or DBD::Sybase is to use the CPAN module:

   perl -MCPAN -e shell
   cpan> install Sybase::CTlib

On a Unix system you will probably need to be root to run this command.

2.2 Build fails with a compiler error

Typical error:

    cc -c -I/apps/sybase/include  -xO3 -xdepend     -DVERSION=\"2.14\"  -DXS_VERSION=\"2.14\" -KPIC -I/usr/perl5/5.00503/sun4-solaris/Cc
    cc: unrecognized option `-KPIC'
    cc: language depend not recognized
    cc: CTlib.c: linker input file unused because linking not done

Several systems (Solaris 8 and later, recent versions of IRIX) come with a prebuilt copy of perl. This is usually built with the extra-cost compiler (Forte-C for Sun, for example). Perl records the details that are needed to compile modules in its Config.pm file, and these details are in general fairly compiler specific. If you do not have the compiler that was used to build perl then it is very likely that you won't be able to build sybperl (or any other binary module) with a different compiler (typically gcc).

It is sometimes possible to hack perl's Config.pm file to fix this sort of error - but I really don't recommend it.

Instead, download the perl source from http://www.perl.org/ or one of its mirrors, and build perl from source.

2.3 make test fails

There can be several reasons for this.


General Questions

3.1 Can sybperl 2.xx be used with Sybase <insert version here>

The short answer is yes.

The long answer: the newer features (such as wide varchar columns, support for DATE and TIME columns) is only be available in recent versions of sybperl (2.15 and later), and then only if you also built sybperl against a copy of Open Client that supports these features. Furthermore you should not use a sybperl binary with different OpenClient installation from the one used when it was built due to potential binary incompatibilities.


AUTHOR

Michael Peppler, with data from the sybperl-l mailing list.