Re: more on execute_array not complying with the specification

"Martin J. Evans" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Organization Easysoft Limited
Message-ID <[email protected]>
On 01/02/11 15:50, John Scoles wrote:
>  On 01/02/2011 10:44 AM, Tim Bunce wrote:
>> On Sun, Jan 30, 2011 at 05:46:49PM +0000, Martin J. Evans wrote:
>>>   push @$tuple_status, [ $sth->err, $sth->errstr, $sth->state ];
>>>
>>>     so I guess the pod should say:
>>>
>>>     "If the execution of a tuple causes an error, then the corresponding status array element will be set to
>>>     a reference to an array containing the err, errstr and state set by the failed execution. If that is the
>>>     case let me know and I'll amend the pod. Otherwise, I'll need to know what was intended.
>> Yes, the state should be included and mentioned in the docs. Thanks.
>>
>>> # NOTE: I'd like to do the following test but it requires Multiple
>>> # Active Statements and although I can find ODBC drivers which do this
>>> # it is not easy (if at all possible) to know if an ODBC driver can
>>> # handle MAS or not.
>> Perhaps try to run it and if it gets an error, and the error indicates
>> lack of MAS, then skip the test.
>>
>> Tim.
>>
>> p.s. Sorry for the delay.
> Ok I will have to add that into DBD::Oracle,  What exactly should go into the "State"  I am sort of unclear on what should be there?
> 

The state if you have not got one is S1000 - see state in DBI docs. I've not checked but I think if you don't set it when you call set_err (or the macro for XS) it defaults to S1000 if it is an error.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.