Connect to QuickBooks Online from Strawberry Perl

Work with QuickBooks Online data from your Perl scripts and applications.

Download the QuickBooks Online ODBC driver. Then follow the instructions in this article to install and license the driver and set up the ODBC data source that enables you to connectOffice to QuickBooks online. If your Strawberry Perl distribution is 32-bit, set up a 32-bit ODBC data source. If your Strawberry Perl distribution is 64-bit, set up a 64-bit ODBC data source.

Connect QuickBooks Online from Perl

Strawberry Perl is a Perl distribution for Windows that includes the necessary middleware layers (Perl DBI and Perl DBD::ODBC) to enable the QuickBooks Online ODBC driver to connect your Perl applications to QuickBooks Online.

  1. On your Strawberry Perl machine, create a new Perl script with the following contents:
    #!/usr/bin/perl -w
    use strict;
    use DBI;
    my $dbh = DBI-> connect('dbi:ODBC:MyQuickBooksOnlineDataSource');
    my $sql = "select ListID, DisplayName from Vendor where ListID = '56'";
    # Prepare the statement.
    my $sth = $dbh->prepare($sql)
        or die "Can't prepare statement: $DBI::errstr";
    # Execute the statement.
    # Fetch and display the result set value.
    while(($ListID,$DisplayName) = $sth->fetchrow()){
    $dbh->disconnect if ($dbh);
  2. Run the Perl script, which will then retrieve a record from the Vendors table.