Re: Multiple selectrow_array calls with statement handle error

2008-04-17 Thread Tim Bunce
On Wed, Apr 16, 2008 at 12:12:47PM -0700, Douglas Wilson wrote: On Tue, Apr 15, 2008 at 2:30 PM, Tim Bunce [EMAIL PROTECTED] wrote: Try this (completely untested) patch to the DBI: like I said...it works for me, but if that's the fix, then you'll want to do selectall_arrayref also (same

Re: Multiple selectrow_array calls with statement handle error

2008-04-16 Thread Douglas Wilson
On Tue, Apr 15, 2008 at 2:30 PM, Tim Bunce [EMAIL PROTECTED] wrote: Try this (completely untested) patch to the DBI: --- Driver.xst (revision 10993) +++ Driver.xst (working copy) @@ -157,7 +157,11 @@ AV *row_av; PPCODE: if (SvROK(ST(1))) { - sth = ST(1); +

Re: Multiple selectrow_array calls with statement handle error

2008-04-16 Thread Douglas Wilson
On Tue, Apr 15, 2008 at 2:30 PM, Tim Bunce [EMAIL PROTECTED] wrote: Try this (completely untested) patch to the DBI: like I said...it works for me, but if that's the fix, then you'll want to do selectall_arrayref also (same problem). -Doug

Re: Multiple selectrow_array calls with statement handle error

2008-04-15 Thread Douglas Wilson
On Mon, Apr 14, 2008 at 3:28 AM, Tim Bunce [EMAIL PROTECTED] wrote: Did you build a fresh copy of DBD::Sybase after upgrading DBI? To get this fix you'd need to do that. Probably worth retrying, just to be sure. I didn't really upgrade DBI, as it is a brand new install of perl (5.10.0),

Re: Multiple selectrow_array calls with statement handle error

2008-04-15 Thread Michael Peppler
Douglas Wilson wrote: With DBI 1.602 and DBD::Sybase 1.08 I get: Can't locate object method DELETE via package DBI::st on the second selectrow_array call. If I replace $sth with $sql in the selectrow_array calls, then it works correctly. I did find a similar problem here:

Re: Multiple selectrow_array calls with statement handle error

2008-04-15 Thread Tim Bunce
On Tue, Apr 15, 2008 at 09:00:56PM +0200, Michael Peppler wrote: Douglas Wilson wrote: With DBI 1.602 and DBD::Sybase 1.08 I get: Can't locate object method DELETE via package DBI::st on the second selectrow_array call. ( $total ) = $dbh-selectrow_array( $sth, undef, $id ); ( $total ) =

Re: Multiple selectrow_array calls with statement handle error

2008-04-14 Thread Tim Bunce
On Thu, Apr 10, 2008 at 10:47:32PM -0800, Douglas Wilson wrote: On Thu, Apr 10, 2008 at 3:36 PM, Tim Bunce [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 11:15:30AM -0700, Douglas Wilson wrote: Are you *certain* that that code is running with DBI 1.602? Try adding a print of

Re: Multiple selectrow_array calls with statement handle error

2008-04-12 Thread pgodfrin
On Apr 10, 2:34 pm, [EMAIL PROTECTED] (Pgodfrin) wrote: On Apr 10, 1:15 pm, [EMAIL PROTECTED] (Douglas Wilson) wrote: To Christian Merz: I'm executing this 1000's of times in the actual code, that is why I've prepared the query rather than passing in the sql string every time. For now

Re: Multiple selectrow_array calls with statement handle error

2008-04-11 Thread Douglas Wilson
On Thu, Apr 10, 2008 at 3:36 PM, Tim Bunce [EMAIL PROTECTED] wrote: On Thu, Apr 10, 2008 at 11:15:30AM -0700, Douglas Wilson wrote: Are you *certain* that that code is running with DBI 1.602? Try adding a print of $DBI::VERSION. Yes, I am certain. This is a new install (and I checked

Multiple selectrow_array calls with statement handle error

2008-04-10 Thread Douglas Wilson
With DBI 1.602 and DBD::Sybase 1.08 I get: Can't locate object method DELETE via package DBI::st on the second selectrow_array call. If I replace $sth with $sql in the selectrow_array calls, then it works correctly. I did find a similar problem here:

Re: Multiple selectrow_array calls with statement handle error

2008-04-10 Thread Christian Merz
Hi Douglas, my 'perldoc DBI' (VERSION=1.43) says: # @row_ary = $dbh-selectrow_array($statement, \%attr, @bind_values); # This utility method combines prepare, execute and fetchrow_array # into a single call. According to this * it is correct to use your $sql * there is no need to prepare the

Re: Multiple selectrow_array calls with statement handle error

2008-04-10 Thread Tim Bunce
On Wed, Apr 09, 2008 at 04:29:48PM -0700, Douglas Wilson wrote: With DBI 1.602 and DBD::Sybase 1.08 I get: Can't locate object method DELETE via package DBI::st on the second selectrow_array call. If I replace $sth with $sql in the selectrow_array calls, then it works correctly. I did find

Re: Multiple selectrow_array calls with statement handle error

2008-04-10 Thread Douglas Wilson
To Christian Merz: I'm executing this 1000's of times in the actual code, that is why I've prepared the query rather than passing in the sql string every time. For now I am just calling execute(), fetchrow_array(), and finish() explicitly. Below find the trace output: On Thu, Apr 10, 2008 at

Re: Multiple selectrow_array calls with statement handle error

2008-04-10 Thread Tim Bunce
On Thu, Apr 10, 2008 at 11:15:30AM -0700, Douglas Wilson wrote: $dbh-trace(9); ( $total ) = $dbh-selectrow_array( $sth, undef, $id ); ( $total ) = $dbh-selectrow_array( $sth, undef, $id ); A DBI trace should shed more light on it. Thanks. I believe this was fixed in DBI 1.57 (svn

Re: Multiple selectrow_array calls with statement handle error

2008-04-10 Thread pgodfrin
On Apr 10, 1:15 pm, [EMAIL PROTECTED] (Douglas Wilson) wrote: To Christian Merz: I'm executing this 1000's of times in the actual code, that is why I've prepared the query rather than passing in the sql string every time. For now I am just calling execute(), fetchrow_array(), and finish()