Sent this too early sorry. The error was:
$sth0->$dbh1->prepare($sql0); the correction is: $sth0=$dbh1->prepare($sql0); Syntax is kicking my butt today. No matter how long I stare at it - the more I oversee it. Thanks all. Ken Ken Barker IT Lead Americall Group, Inc 314-213-7927 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ken Barker Sent: Wednesday, September 28, 2005 2:54 PM To: [email protected] Subject: DBI::ODBC Gurus I am use DBI and DBD::ODBC and have written many scripts with no errors. I am working on a new script that will do a simple update and I get the following error: Can't locate auto/DBI/db=HASH(0x19cc018).al in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at step01a.pl line 135 Here is the pertinent code where it is failing. Specifically it fails on the prepare statement. However when I take the SQL statement that is printed and run it in SQL Analyzer - it runs fine. if($rowcnt == 1){ #perform update $sql0 = "update $name1 set custid = '$custid' where vsamid = '$vsamid' and convert(varchar(8),reportdate,112) = '20050922' and luckynumber is null"; print "$sql0\n"; my $wait = <>; $sth0->$dbh1->prepare($sql0); $sth0->execute || die "Can't update LeadManager2\n"; $sth0->finish; } All help is greatly appreciated. Ken Ken Barker IT Lead Americall Group, Inc 314-213-7927 [EMAIL PROTECTED] _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ______________________________________________________________________ This e-mail has been scanned by MCI Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on MCI's Managed Email Content Service, visit http://www.mci.com. ______________________________________________________________________ ______________________________________________________________________ This e-mail has been scanned by MCI Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on MCI's Managed Email Content Service, visit http://www.mci.com. ______________________________________________________________________ _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
