Installing Perl/DBI support on Windows

 Prepare your computer
  1. Install ActivePerl 5.6.0 or later. You can use the ActivePerl installer to install Perl and configure your computer. You do not need to recompile Perl.

  2. Install Microsoft Visual Studio and configure your environment.

    If you did not choose to configure your environment at install time, you must set your PATH, LIB, and INCLUDE environment variables correctly before proceeding. Microsoft provides a batch file for this purpose. For 32-bit builds, a batch file called vcvars32.bat is included in the vc\bin subdirectory of the Visual Studio 2005 or 2008 installation. For 64-bit builds, look for a 64-bit version of this batch file such as vcvarsamd64.bat. Open a new system command prompt and run this batch file before continuing.

    For more information about configuring a 64-bit Visual C++ build environment, see [external link] http://msdn.microsoft.com/en-us/library/x4d2c09s.aspx.

 Install the DBI Perl module on Windows
  1. At a command prompt, change to the bin subdirectory of your ActivePerl installation directory.

    The system command prompt is strongly recommended as the following steps may not work from alternative shells.

  2. Using the Perl Module Manager, enter the following command.

    ppm query dbi

    If ppm fails to run, check that Perl is installed correctly.

    This command should generate two lines of text similar to those shown below. In this case, the information indicates that ActivePerl version 5.8.1 build 807 is running and that DBI version 1.38 is installed.

    Querying target 1 (ActivePerl 5.8.1.807)
      1. DBI [1.38] Database independent interface for Perl

    Later versions of Perl may show instead a table similar to the following. In this case, the information indicates that DBI version 1.58 is installed.

    name version abstract area
    DBI 1.58 Database independent interface for Perl perl

    If DBI is not installed, you must install it. To do so, enter the following command at the ppm prompt.

    ppm install dbi
 Install DBD::SQLAnywhere on Windows
  1. At a command prompt, change to the SDK\Perl subdirectory of your SQL Anywhere installation.

  2. Enter the following commands to build and test DBD::SQLAnywhere.

    perl Makefile.PL
    nmake

    If for any reason you need to start over, you can run the command nmake clean to remove any partially built targets.

  3. To test DBD::SQLAnywhere, copy the sample database file to your SDK\Perl directory and make the tests.

    copy "%SQLANYSAMP12%\demo.db" .
    dbeng12 demo
    nmake test

    If the tests do not run, ensure that the bin32 or bin64 subdirectory of the SQL Anywhere installation is in your path.

  4. To complete the installation, execute the following command at the same prompt.

    nmake install

The DBD::SQLAnywhere interface is now ready to use.