I wasn't very clear, sorry. Add those two lines to the *driver* source code.
Tim. On Tue, Sep 17, 2002 at 11:30:58AM +0200, sidi MOHAMED CHEINE wrote: > > Or want that I add these two lines. In my program I call upon the method connect, >as follows $dbh=DBI->connect(....) and not $dbh = DBI::_new_dbh($drh..) > has less than you do not want that I make the change in the DBI.pm module?? > Sidi > Tim Bunce <[EMAIL PROTECTED]> a crit : Try adding these two lines > > 'Err' => \my $err, > 'Errstr' => \my $errstr, > > just after this line > > my $dbh = DBI::_new_dbh($drh, { > > and that should at least allow separate database handles to have > separate error values. > > Let me know if it works (I've no time to test it now). > > Tim. > > On Sun, Sep 15, 2002 at 02:00:54PM +0200, sidi MOHAMED CHEINE wrote: > > Hi, > > > > Here an example of my code, I would like in the > > routine Warning knowledge if $$dbh1 or $$dbh2 who A > > causes the error. > > > > Thank you and good day. > > > > Sidi. > > $dbh1 = DBI->connect( $dburl, $user1, $pass1, $options > > ); > > $dbh2 = DBI->connect( $dburl, $user2, $pass2, $options > > ); > > > > eval { > > # for first descriptor > > > > $OraSet2 = $dbh1->prepare($sQli[79].$Zone); > > #$sQli[79].$Zone is an unspecified request # > > execution of the request > > $OraSet2->execute(); > > $bWait = !($OraSet2->fetchrow_array); > > $OraSet2->finish(); > > > > # for second descriptor > > $OraSet2 = > > $dbh2->prepare($sQli[39].$Table{Nomtab}.$Table{Suffixe}.&Q1); > > # execution of the request > > $OraSet2->execute(); > > > > $Lignes = $OraSet2->fetchrow_array; > > > > $OraSet2->finish(); > > } > > Warning ($@) if(chomp($@)); > > > > sub Warning { > > my ($Zone)= @_; > > print "Zone = $Msg\n"; > > > > #ici $dbh1->err = $dbh2->err et $dbh1->errstr > > = $dbh2->errstr > > #how could I dissociate them to make a particuier > > treatment according to whether > > #the error comes from one or other > > if ($OraSilo->err > 0) { > > #traitement > > } > > elsif ($OraData->err > 0) { > > #traitement > > } > > } > > > > > > --- Tim Bunce a crit: > The > > docs say: > > > > > > The DBI resets $h->err to undef before most DBI > > > method calls, so the > > > value only has a short lifespan. Also, most > > > drivers share the same > > > error variables across all their handles, so > > > calling a method on > > > one handle will typically reset the error on all > > > the other handles > > > that are children of that driver. > > > > > > That may be the issue. > > > > > > Tim. > > > > > > On Wed, Sep 11, 2002 at 04:51:08PM +0200, sidi > > > MOHAMED CHEINE wrote: > > > > I have a problem with dbi, I set up a system of > > > > capture of error. > > > > In my program I use two descriptors dbi, only when > > > I > > > > intercept an error on the undes descriptors, the > > > tests > > > > of errors $sth->err gives the same result on both. > > > Is > > > > what somebody would have a solution has to propose > > > to > > > > me > > > > thank you in advance > > > > > > > > and good day. > > > > > > > > Sidi > > > > > > > > > > > > > ___________________________________________________________ > > > > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite > > > et en franais ! > > > > Yahoo! Mail : http://fr.mail.yahoo.com > > > > ___________________________________________________________ > > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en franais ! > > Yahoo! Mail : http://fr.mail.yahoo.com > > > --------------------------------- > Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en franais !