Ok, I have IIS running on my local machine and I know it works, I have sql server running on a remote machine and I know it works, put when I bring them together with perl I get nothing please help.

This Works
<html> <head> <title>test page</title> </head> <body> <h1>Hello World!!!</h1> </body> </html>
And This Works
#!/usr/bin/perl # dbtest.pl use warnings; use strict; use DBI; my ($CDS, $UPDATE, $name, $type, $len, $sqlquery); $CDS=DBI->connect('DBI:ODBC:claudonntUPDATE', 'xxxx', 'xxxx') || die "error opening database: $DBI::errstr\n"; # sql query ******************************************* $sqlquery=$CDS->prepare(" SELECT catid, description, count (*) FROM cds_prod, cds_cctxx WHERE catid = id GROUP BY catid, description ORDER BY catid;") || die "Prepare failed: $DBI::errstr\n"; $sqlquery->execute() || die "couldn't execute query: $DBI::errstr\n"; while (($name, $type, $len) = $sqlquery->fetchrow_array) { print "$name","\t","$type", "\t","$len\n"; } $sqlquery ->finish(); $CDS->disconnect || die "failed to disconnect\n";
BUT THIS DOSEN'T - it is being called as http://localhost/scripts/dbtestonline.pl - I think it is failing at $CDS=DBI->connect... but I don't know why
#!/usr/bin/perl # dbtest.pl use warnings; use strict; use DBI; print "Content-type: text/html\n\n"; my ($CDS, $UPDATE, $name, $type, $len, $sqlquery); print " <html> <head> <title>dbtest </title> </head> <body>"; $CDS=DBI->connect('DBI:ODBC:claudonntUPDATE', 'xxx', 'xxx') || die "error opening database: $DBI::errstr\n"; # sql query ******************************************* $sqlquery=$CDS->prepare(" SELECT catid, description, count (*) FROM cds_prod, cds_cctxx WHERE catid = id GROUP BY catid, description ORDER BY catid;") || die "Prepare failed: $DBI::errstr\n"; $sqlquery->execute() || die "couldn't execute query: $DBI::errstr\n"; print "<center><table Border=1>"; while (($name, $type, $len) = $sqlquery->fetchrow_array) { print "<tr><td>$name</td> <tr>$type</td> <tr>$len</td></tr>"; } print "</table></center></body><html>"; $sqlquery ->finish(); $CDS->disconnect || die "failed to disconnect\n";

In reply to perl, IIS, and sql Server help by esolm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.