Accessing Pervasive.SQL With Perl

Page Last Modified: 20/10/20

Home Links ODBC (DBI) Contact

These pages contain some examples on how I access the Pervasive.SQL database management system using Perl. This is a task I have often had to do over the last few years during my main employment (supporting a legacy database application), either running the Perl code via the usual 'perl ..' interpreter command or building a stand-alone, self-extracting Windows .EXE.

Up until now I have been accessing Pervasive.SQL via the popular DBI + ODBC combination (having used Win32::ODBC in my early days of attacking databases with Perl), which to me is the simplest and quickest solution. Therefore these pages will concentrate on this mechanism for the forseeable future. Using ODBC with Pervasive.SQL (particularly older versions of the latter) does have its issues and I have started investigating other ways of accessing the database, e.g. using Win32::API, Inline::C and some Pervasive.SQL/Btrieve-specific packages that have been on CPAN for a while - if any of these alternatives prove feasible I will include the details here later on.

Go to accessing Pervasive.SQL with Perl + DBI + ODBC

Go to accessing Pervasive.SQL with Perl + Win32::ODBC (and Win32::DBIODBC)

Go to accessing Pervasive.SQL with Perl + Win32::API

Go to accessing Pervasive.SQL with Perl + ADO (work in progress)

Notes

  1. Most of these solutions should work with any version of Pervasive.SQL from 2000 to 14, although most have only been tested on 2000i, 9.5, 10.x, 12 and 14. Although Pervasive.SQL has been released over the years on various *nix platforms (and I even had luck accessing it on Mac OSX in version 2000i with the JDBC driver when the latter was, and with version 11 still is, a type 4 driver), all of my development for the last few years has been on Windows (32-bit and 64-bit) using the 32-bit Perl interpreter. Therefore I am unable to test how much of the material applies to other platforms...sorry :-(
  2. Actian PSQL 13 (rebranded as Actian Zen Embedded) introduced a new Btrieve 2 C/C++ API along with SWIG files for accessing this in Perl (and Python and PHP). There does not appear to be any documentation on Perl/SWIG access on the Actian website at present (September 2017) and I am not yet using v13 or later for development - I will add examples here when/if I do.
  3. Until recently I have been using ActiveState's ActivePerl and Perl Dev Kit to create self-extracting Windows executables; however ActivePerl no longer support this method of distributing Perl applications and I have switched to using Strawberry Perl to do this.

 

 

Finally, this disclaimer applies to these pages, as do these privacy policies.

 

Home Links ODBC (DBI) Contact

All content on this site is copyright
Neil Hughes 2010 - 2020