Felix Geerinckx wrote: >on Wed, 04 Sep 2002 12:27:23 GMT, [EMAIL PROTECTED] (Roger >Perttu) wrote: > > > >>I have absolutely no control of the "query". >> >> > >So a simple 'DROP DATABASE' would also be acceptable ;-) > Yes, The user might want to copy data from a production database to a reporting database. Drop and load a empty template database.
> >You can always write your own error handler. > >Search > > perldoc DBI > >for 'HandleError' > > > Thanks, thats seems much better than using eval. I've been too focused on finding something similar to $sth->{odbc_more_results} so I missed HandleError in the docs. I guess that execute() doesn't do much and that the "magic" starts when you fetch. The problem of detecting the cause of the error is still the same if I use HandleError. I get err = -1 and the "string no select statement currently executing". I don't feel comfortable detecting an error by comparing strings.