How about applying the corrections and suggestions provided earlier on this
list?

The "DBI.errstr" all by itself should get you a warning if you add 'use
strict;' to the script and '-w' to the '#!' line.  There are almost
certainly other problems that those two additions would expose too.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "M.W. Koskamp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, May 07, 2001 09:04
Subject: Re: Urgent Help Please


> Let's try some shorter code first so it is easier to find the error:
>
> #!c:/perl/bin/perl
> use CGI qw(:standard);
> use DBI;
> $ query= new CGI();
>
> @tryarr=(3456,3457,3489,2723);
>
>  my $dbh= DBI->connect('DBI:ODBC:SCART','team','team') or
> die " Sorry could not  connect". DBI.errstr;
> print $query->header();
>
> print start_html();
>
> $rs= $dbh->prepare("Select * from Products where ProductId=?")or   die "
> Sorry could not  prepare". $dbh->errstr;
>
> foreach $prodid (@tryarr) {
>    print "<br>$prodid";
>    print "<ul>\n"
>    $rs->execute($prod);
>    while(@data=$rs->fetchrow_array {
>    map {print "<LI>$_"}@data;
>    print "</ul>\n";
> }
>
>
> try to run this, and see if it  works.....


Reply via email to