Hello James,
so let me describe whole story again.
we have stored procedure:
create procedure test_me as
select getdate()
print test
select getdate()
Then we have piece of perl:
my $query = 'exec testproc';
my $sth = $dbh->prepare($query);
$sth->execute || die "Error running query $query";
while ( my $d = $sth->fetchrow_arrayref ) {
print Dumper $d; #should return first getdate()
}
while ( my $d = $sth->fetchrow_arrayref ) {
print Dumper $d; #should return second getdate()}
Perl is connecting through DBD::ODBC version 1.45
then we have unixODBC ( 2.3.1 ) as odbc manager, we also tried version 2.3.4
and we have both:
FreeTDS 0.91.dev.20110409RC1 (also tried FreeTDS 0.95.81), Easysoft (don't know version)
When we use easysoft driver the result set contains date, then printed text "test" and another result set contains another date.
When we use FreeTDS driver result set contains:
date
printed out 'test'
followed by invalid cursor state error.
When we do not fetch the second result set no error is thrown.
Sorry, but I have no idea how to understand ODBC logs.
Jakub
______________________________________________________________
> Od: "James K. Lowden" <[email protected]>
> Komu: <[email protected]>
> Datum: 26.02.2016 20:00
> Předmět: Re: [freetds] freetds - invalid cursor state
>
On Thu, 25 Feb 2016 21:17:15 +0100
<[email protected]> wrote:
> Both are attached. I would really apreciate if you can take a look at
> these logs and try to identify the root cause.
Perhaps I'm missing something, but to me it looks like a contradiction.
In the FreeTDS log, we see,
[ODBC][21590][1456398626.473093][SQLError.c][389]
Exit:[SQL_SUCCESS]
SQLState = 24000
Native = 0x7fff2ad0ec58 -> 0
Message Text = [[FreeTDS][SQL Server]Invalid
cursor state]
SQL_SUCCESS is not an error, so "Invalid cursor state" cannot describe
the state. Either the operation succeeded, or it failed because of an
invalid cursor state.
--jkl
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds <http://lists.ibiblio.org/mailman/listinfo/freetds>
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
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.