> A few months ago we had discussed on this list _standardizing_ error
> handling for things like trying to insert duplicate records, but I kind
> of dropped the ball - changing jobs and all didn't leave me enough time
> to persue that standardization with members of this list.  And since now
> I don't use Perl in my new job, I don't have time to persue it at all. 
> Anyone else have time to revisit standardizing error handling for things
> like "Trying to insert duplicate record"???  Basically all it involved
> was putting together a list of common error conditions and finding the
> corresponding ODBC error codes.
> Hardy Merrill

Er, isn't that what $h->state() is for ? In *theory*, state (aka SQLSTATE)
codes should be fairly uniform across DBMS's (tho there's always a
lot of platform specific state codes as well). However, I'm not certain
that many drivers actually support $h->state(), or if they do, if they're
conforming to the "standard" (presumably some SQL CLI  std ?).
If everybody adheres to that, then users can do a lookup of the
appropriate SQLSTATE in the <insert SQL manual here> book,
and key off the SQLSTATE value for disposition.

Dean Arnold
Presicient Corp.
www.presicient.com

Reply via email to