> Hi all, > > if I write: > ------------------------------ Begin snip ---------------------------- > $|++;use strict;use warnings; > #use DBD::ADO; > # *1) > use DBI; > our ($dbh,$sth); > my $DB="dbi:ADO:driver=Microsoft Access Driver > (*.mdb);DBQ=Konverter.mdb;DRIVERID=25;DEFAULTDIR=M:\\TestLib\\Konverter_NE > U\\;"; > $dbh=Connect($DB.'{AutoCommit=>0}')or die; > $sth=Prepare ("INSERT INTO [TAB] VALUES (?,?)",$DB); # *2) > sub Connect { > my $dbh = DBI->connect_cached(($_[0]=~/dbi:/i)?"$_[0]":"dbi:ODBC:$_[0]") > > or die "Error connecting > dbi:ODBC:$_[0]".$DBI::errstr."\n";return $dbh > } > sub Prepare {my $sth=Connect($_[1])->prepare($_[0]) or die > $DBI::errstr."\n";return $sth} > END{print "1\n"; > $main::sth->finish; > # *2) > print "2\n";$main::dbh->disconnect;print "3\n"} > ------------------------------ End snip ---------------------------- > > I have this: > > ------------------------------Begin STDOUT > ---------------------------------- > 1 > 2 > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154. > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154. > 3 > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154 during global destruction. > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154 during global destruction. > ------------------------------End STDOUT > ---------------------------------- > > if I uncomment 'use DBD::ADO' ( *1) ) I have: > > ------------------------------Begin STDOUT > ---------------------------------- > 1 > 2 > 3 > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154 during global destruction. > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154 during global destruction. > ------------------------------End STDOUT > ---------------------------------- > > if I comment lines *2) (no prepare) and uncomment line *1) > I have correct run > > ------------------------------Begin STDOUT > ---------------------------------- > 1 > 2 > 3 > ------------------------------End STDOUT > ---------------------------------- > > if I comment lines *2) (no prepare) and comment line *1) > I have > > ------------------------------Begin STDOUT > ---------------------------------- > 1 > 2 > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154. > Win32::OLE(0.1702): GetOleObject() Not a Win32::OLE object at > C:/Perl/site/lib/Win32/OLE/Lite.pm line 154. > 3 > ------------------------------End STDOUT > ---------------------------------- > > what's wrong ? ? ? > > I need the access AND the prepare AND the clear up in END-Block > I need not the warnings/errors from Win32::OLE > what's the difference I load 'DBD::ADO' in my script or DBI load > 'DBD::ADO' ? ? > > > I have: Perl v5.8.6 Binary build 811 > DBI 1.46 > Win32::OLE 0.1702 > DBD::ADO 2.94 > w2k SP4 > > Bests regards/Mit freundlichen Grüssen > Joachim Görner > > Informationsverarbeitung Systemtechnik Basisdienste (ISB) > ADAC e.V., Am Westpark 8, 81373 München > Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > www.adac.de <www.adac.de> > >
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs