[freetds] Best way to do RPC ?

Swapna_Anand Swapna_Anand at Satyam.com
Wed Apr 9 04:56:46 EDT 2003

Hi Raphael,
	CTLib RPC implementation and sample programs are available in the
nightly snapshot.

-----Original Message-----
From: Raphael Hertzog [mailto:eng at eipm.ch]
Sent: Wednesday, April 09, 2003 2:25 PM
To: FreeTDS Mailing List
Subject: [freetds] Best way to do RPC ?


I want to launch Remote Procedure Call from a Linux PC. Thus I found
freetds and decided to use it.

First disappointment, sqsh uses ctlib and isn't able to do RPC with
parameters because CTLib doesn't support that. I looked in the archives
and discovered that DBLib supports RPC with parameters.

I decide to try that and I write a little test program (cf testftds.c in
attachment). The program works well except that it doesn't return
anything (whatever the parameter I give) ... the result set returned is
always empty and it shouldn't.

Can you tell me what's wrong in what I did ? You can test it if you have
a SQL Server 2000 installed somewhere ... I use the sample database
"pubs" for the test. You just need to add a [demo] section to your
/etc/freetds.conf file ... I tried several version of the protocol (7,
8, 4.2) without success.

Otherwise, I tried tsql and there it worked without problem (sending
"byroyalty @percentage=100\ngo").

In your opinion, what's the best way to manage RPC right now ? With
DBLib ? with tds_submit_query directly, bypassing at the same time all
the checks (like it's done in tsql) ?

Raphaël Hertzog - EIPM SA
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.

More information about the FreeTDS mailing list