On 06/25/2014 07:53 PM, siegfr...@heintze.com wrote:
The following program works great inside of IIS when called from
internet explorer (IE).

It also works great if I remove the comment characters ("#") in column 1
and run it at the cygwin bash command prompt. It displays the expected
HTML.

However, if I only remove the first comment character in column one and
run it in IIS, internet explorer times out and complains about a bad
header being returned.

Can someone help me so I can incorporate DBI and microsoft access in my
web page?
Thanks
Siegfried


use DBI;
use strict;
use warnings;
use POSIX;
use CGI qw(:standard);
use CGI::Cookie;
#my $dbh  = DBI->connect("dbi:ODBC:driver=microsoft access driver
(*.mdb, *.accdb);dbq=c:\\inetpub\\wwwroot\\Nwind.accdb");
# $dbh->{LongReadLen} = 66000;
# $dbh->{LongTruncOk} = 0;
# my $stmt="SELECT * FROM Customers";
# my $sth = $dbh->prepare($stmt);
# $sth->execute || die "Could not execute SQL statement $stmt ... maybe
invalid?";
my $q =new CGI;
my $ct = strftime "%a %b %d %H:%M:%S %Y\n", localtime;
$q = new CGI;                        # create new CGI object
print $q->header,                    # create the HTTP header
       $q->start_html('hello world'), # start the HTML
       $q->h1("hello world $ct");         # level 1 header

print $q->end_html;                  # end the HTML
I can never remember which list want top or bottom posts so if I got the wrong 
end, please be gentle.

The first question that comes to mind is which perl binary is installed on your 
 windows system?

The next question is what do the iis logs tell you?  The calls to CGI look ok, 
as do the DBI calls except you may want to quote the strings with embedded 
spaces.

I've very conversant in IIS and Apache on both Linux and Windows so feel free 
to contact me off list.

Bruce


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to