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