Skip to Content.
Sympa Menu

freetds - Re: [freetds] dbsqlok() after dbrpcsend() hangs

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] dbsqlok() after dbrpcsend() hangs
  • Date: Thu, 5 Jul 2007 18:09:36 -0400

Tim Cook wrote:
> My example code executes a stored procedure and displays the results.
>
> dbrpcinit(dbproc, "storedproc", 0);
> dbrpcsend(dbproc);
> dbsqlok(dbproc);
> dbresults(dbproc);
> ...
>
> The above code works fine when built using the Sybase library but
> when I execute it with the freetds library the program hangs in
> dbsqlok(). Using gdb to debug the code it looks as if dbsqlok() is
> eventually calling select() to wait for a response from the server
> which it never gets and it just sits there. Setting a timeout in the
> freetds.conf file causes the select() to timeout as expected but it
> still doesn't work.
>
> As far as I can tell from reading the documentation, executing a
> dbsqlok() after a dbrpcsend() is the correct thing to do.

It's the correct thing to do, and it should work. Does
src/dblib/unittests/rpc.c work? It does the same thing.

ATM I don't have a Sybase server to test with, not that I have much time.
If the unit test works then we should try to distinguish between it and
your code. If it doesn't then the rpc protocol differences are the like
culprit.

HTH.

--jkl





Archive powered by MHonArc 2.6.24.

Top of Page