[freetds] Invalid Cursor state

jezekj at centrum.cz jezekj at centrum.cz
Fri Jan 29 13:31:28 EST 2016

I have dumped my session with logging(default level) enabled. File is attached.
> Od: Frediano Ziglio <freddy77 at gmail.com>
> Komu: FreeTDS Development Group <freetds at lists.ibiblio.org>
> Datum: 29.01.2016 14:52
> Předmět: Re: [freetds] Invalid Cursor state
2016-01-28 19:51 GMT+00:00  <jezekj at centrum.cz>:
> Hello,
> first of all I would like to thank you for creating and maintaining FreeTDS. In our application we do have procedure to trace progress of huge procedures execution to easily find out where the error is. This procedure contains raiserror function. When in another procedure I call select after trace procedure is called out I got invalid cursor state. i.e.:
> create procedure sp_trace as
>   raiserror('test', 0, 1)
> go
> create procedure sp_test_me as
>   select getdate()
>   execute sp_trace
>   select getdate()
> go
> Then we call out from perl:
> my $dbh=APPDBI->masterConnect();
> my $statement='execute sp_test_me';
> my $sth=$dbh->prepare($statement);
> my $sth->execute;
> while (my $d=$sth->fetch;){ #get 1st result set (first getdate)
>   print Dumper $d;
> }
> while (my $d=$sth->fetch;){ #get 2nd result set (second getdate)
>   print Dumper $d;
> }
> Can you confirm this is a bug which can/will be fixed?
> We have tried other driver in our setup (easysoft) and it is not case.
> Please let me know wah other details you need from me to support you in investigation.
> Best Regards,
> JJ

  it's indeed quite strange. Have a look at
http://www.freetds.org/userguide/askingforhelp.htm <http://www.freetds.org/userguide/askingforhelp.htm> and
http://www.freetds.org/userguide/logging.htm <http://www.freetds.org/userguide/logging.htm>. With the dump we can
understand a lot like which library is Perl using and how. As your
problem is not logging in you could strip the login part if you feel
more comfortable for security reasons.

FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds <http://lists.ibiblio.org/mailman/listinfo/freetds>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fetch_TDS.log
Type: text/x-log
Size: 25451 bytes
Desc: fetch_TDS.log
URL: <http://lists.ibiblio.org/pipermail/freetds/attachments/20160129/db693261/attachment-0001.bin>

More information about the FreeTDS mailing list