Accessing Pervasive.SQL With Perl
Page Last Modified: 27/12/16
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 using ActiveState's ActivePerl and Perl Dev Kit.
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 + ADO (work in progress)
Note that most of these solutions should work with any version of Pervasive.SQL from 2000 to 12, although most have only been tested on 2000i, 9.5, 10.x or 12. 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 :-(
All content on this site is copyright