On Fri, Oct 12, 2001 at 02:28:16AM -0400, Thomas A.Lowery wrote:
> I've a DBD::ADO function call OpenSchema, which requires a parameter
> like 'adPrimaryKeys'. When the constant is not defined, I set an error
> value/message and return to the caller.
>
> unless (exists $ado_consts->{$var}) {
> return DBI::set_err($dbh, 1,
> "OpenSchema called with unknown parameter: $var");
> }
>
> However, when I check the $dbh->err value, it is undef. As is the
> $dbh->errstr. Bug? Feature?
The DBI dispatcher distinguishes between calls for which it should
reset the error flag beforehand and check it afterwards (like
execute), vs those where it should leave the error flag alone and
not check it afterwards (like errstr and func).
I plan to finally polish up document and promote the install_method
method (or a wrapper for it) to public status. Drivers could then
install their own methods and set the flags for each method, including
error handling, as appropriate.
But that doesn't explain why errstr etc are undef. I don't have the
source handy at the moment. You'll need to do some digging...
Tim.