Skip to Content.
Sympa Menu

freetds - [freetds] rpc works!

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] rpc works!
  • Date: Mon, 2 Dec 2002 12:37:49 -0500

> From: Frediano Ziglio [mailto:freddyz77 AT tin.it]
> Sent: November 28, 2002 3:20 PM
>
> I know how to pass named parameters and how to read
> results (already implemented months ago, not by me...)

It works! Yay! Three cheers for Frediano!

Synopsis: With most servers, when you send "exec procname @param output" to
the server, the server writes to @param (it is effectively passed "by
reference"), and you retrieve its value with dbretdata(). Microsoft dropped
support for that feature as of SQL Server 7.0, SP3 (and 2000). You could
invoke the procedure that way, but the server won't return the output
parameter.

The vendors' libraries offer another way to invoke a stored procedure:
dbrpcsend(). While dbrpcsend() works with all servers, it is the only way
to cause SQL Server 2000 to return output parameters.

Until last week, FreeTDS didn't support dbrpcsend(), and now it does.

Unit test results below.

--jkl


$ ./rpc
Start
About to logon
About to open nts0090.tempdb
Dropping proc
Msg 3701, Level 11, State 5
Server 'NTS0090', Line 1
Cannot drop the procedure '#t0022', because it does not exist in the system
catalog.
creating proc
executing dbrpcinit
executing dbrpcparam
executing dbrpcsend
executing dbsqlok
retrieving output parameter... done
ret name 1 is @b
ret type 1 is 56
ret len 1 is 4
ret data 1 is 42
Dropping proc
dblib okay on [...]/dblib/unittests/rpc.c









The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that we do not accept account orders and/or
instructions by e-mail, and therefore will not be responsible for carrying
out such orders and/or instructions.





  • [freetds] rpc works!, Lowden, James K, 12/02/2002

Archive powered by MHonArc 2.6.24.

Top of Page