On Mon, Jun 06, 2005 at 01:11:30PM -0700, Vergara, Michael (TEM) wrote:
> Hi Everyone:
> 
> I want to connect to an Oracle database and test for the existence of
> a table.  My first thought was to SELECT COUNT(*) FROM TABLE, but
> DBI catches the ORA-942 error and I don't know how to catch that.
> It throws the error during the $dbh->execute step;  how do I catch
> an Oracle error returned from that step?
> 
> Or...is there a better way?
> 
> Thanks,
> Mike
> 


Yes there is, and it is even portable (or so they say) across different
vendors. Look for the table_info () method at
http://search.cpan.org/~timb/DBI-1.48/DBI.pm#Database_Handle_Methods

Peter

Reply via email to