my statement connect is :
$dbh = DBI->connect($dsn, $user, $password) ; or
$dbh = DBI->connect($dsn, $user, $password,\%attr) ;

I'm not wrapping database methods in an eval?
and version of DBI for mysql 1.14 driver was cathed from internet one
month ago !

is it really need to use eval ?


Jeff Waugh wrote:

> What does your connect statement look like?
> Are you wrapping your database methods in an eval?
> Are you using outdated versions of DBI or DBD?
>
> Maybe a bit more code would help.
>
> ----- Original Message -----
> From: "Vladimir Korobko" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, April 28, 2001 4:05 AM
> Subject: $DBI::errstr
>
> > Hello all !
> >
> >
> > I try to set automatic error checking for whole script !
> > Error Checking should be done during every operation with DB like
> > connect , execute,
> > disconnect , prepare . And in case of error programm should be
> > terminated !
> >
> > My way is :
> >
> > %attr = (
> >     PrintError=>1,
> >     RaiseError=>1
> >          );
> > or
> > $h->{PrintError} = 1;
> > $h->{RaiseError} = 1;
> >
> > but during execution wrong sql query I only get this warning
> > DBD::mysql::st execute failed: Table 'sms.pentiu' doesn't exist at
> > ./check_available_driver.pl line 23.
> > DBD::mysql::st fetchrow_array failed: fetch() without execute() at
> > ./check_available_driver.pl line 24.
> > and programm does not terminate untile Iset
> >
> > $sth->execute || die "$DBI::errstr\n";
> >
> > when it's look ok and programm is stopped with next message :
> >
> > DBD::mysql::st execute failed: Table 'sms.pentiu' doesn't exist at
> > ./check_available_driver.pl line 23.
> > Table 'sms.pentiu' doesn't exist
> >
> >
> > so how I could check every operation without checking it directly?
> >
> >
> >

--
Mr. Korobko Vladimir
IN System Engineer
Ukrainian Mobile Communications
21 Moskovskaya Str.,
Kiev 01010, Ukraine
Tel.:  +380 50 110 3261
Fax:  +380 44 290 8737

************************************************
Our Web Site   www.umc.com.ua www.sim-sim.com.ua
************************************************


Reply via email to