Hi
 
apologies if this is the wrong place to be,
but Ive searched the web and not got a concrete answer,
or at least not one that Ive recognised.
 
=============================================================================  
 
I have activestate perl 5.8.9
and postgres 8.3.5 on Windows XP Professional service pack 3
on a Toshiba Laptop T2330 processor, 1gig RAM.
 
psql connects to the database fine,
perl works fine from the command line
and via apache 2.2 for printenv.pl type programs.
 
==============================================================================
Ive downloaded the DBD-Pg package ready built from
http://theoryx5.uwinnipeg.ca/ppms/
following the instructions:
 
Packages in this directory may be installed by giving the following command at 
a DOS prompt:  C:\>ppm install http://theoryx5.uwinnipeg.ca/ppms/package.ppd

where package.ppd is the name of the package listed below (with a .ppd 
extension added). 
 
Which is what Ive done with DBD-Pg.pp:
 
C:\Documents and Settings\mwagg.MWAGGPC>ppm install 
http://theoryx5.uwinnipeg/ppms/DBD-Pg.ppdDownloading 
DBD-Pg-1.45...doneUnpacking DBD-Pg-1.45...doneGenerating HTML for 
DBD-Pg-1.45...doneUpdating files in site area...done   6 files unchanged
C:\Documents and Settings\mwagg.MWAGGPC>perl -v
This is perl, v5.8.9 built for MSWin32-x86-multi-thread(with 9 registered 
patches, see perl -V for more detail)
Copyright 1987-2008, Larry Wall
Binary build 825 [288577] provided by ActiveState 
http://www.ActiveState.comBuilt Dec 14 2008 21:07:41
Perl may be copied only under the terms of either the Artistic License or 
theGNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found onthis 
system using "man perl" or "perldoc perl".  If you have access to theInternet, 
point your browser at http://www.perl.org/, the Perl Home Page.
C:\Documents and Settings\mwagg.MWAGGPC>
 
========================================================================
 
This is my test program which works under perl/postgres on linux,
only the #! line is changed obviously:
C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin>more 
test-cgi-script.pl#!c:\perl\bin\perl.exe -w
use strict;use CGI qw(:standard *table);use DBI;
my $dbh = DBI->connect(    "DBI:Pg:dbname=postgres",    "genwrite",    
"owtwrite",    { PrintError => 0, RaiseError => 1},);
my $query = $dbh->prepare("select acno,sort from mwachead where acno = 
?");$query->execute(1);
print header(), start_html("Test");print start_table();print Tr(th("Account"), 
th("SortCode")), "\n";while(1) {    my $row = $query->fetchrow_hashref();    
last unless defined $row;    print Tr(        td(escapeHTML($row->{acno})),     
   td(escapeHTML($row->{sort})),    ), "\n";}print end_table(), end_html();
C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin>
 
 
=====================================================
 
When I execute this program from the command line of my IE7 calling the url,
the command line hangs and I get popup windows dump message for the
Perl Command Line Interpreter and hex dump files.
 
Am I being naive in thinking I can link activestate perl to postgres just by 
downloading a package?
 
Ive done make installing of Oracle DBD on solaris, and Exim make installs on 
solaris,
but I dont want to get into make installs on windows, I just want it to install 
itself.
 
Thanks for your help.
 
Regards
martin Wagg
 
 
 
_________________________________________________________________
Are you a PC?  Upload your PC story and show the world
http://clk.atdmt.com/UKM/go/122465942/direct/01/

Reply via email to