Skip to Content.
Sympa Menu

freetds - [freetds] Best way to do RPC ?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Raphael Hertzog <eng AT eipm.ch>
  • To: FreeTDS Mailing List <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Best way to do RPC ?
  • Date: 09 Apr 2003 10:55:14 +0200

Hello,

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) ?

Cheers,
--
Raphaƫl Hertzog - EIPM SA



Archive powered by MHonArc 2.6.24.

Top of Page