Skip to Content.
Sympa Menu

freetds - Re: [freetds] ct-lib Documentation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] ct-lib Documentation
  • Date: Fri, 13 Dec 2002 00:15:56 -0500

On Thu, 12 Dec 2002 14:56:52 -0700, "Harrison, Bruce (CXO)"
<Bruce.Harrison AT hp.com> wrote:
> It would also appear that the ct-lib is
> (maybe) the better way to do this. Can anyone give me a pointer to the
> ct-lib API interface documentation?

See the FAQ: "http://www.freetds.org/faq.html#Is there other documentation
I should know about".

Sybase lets you download their manuals as pdf files; I find that the most
convenient form.

> BTW, my task is quite simple: I'm connecting to SQL, running a stored
> procedure, and getting a single row (actually two output variables)
> back. My code is currently modeled after the tsql code.

Oh, boy! You don't know what a mouthful that really is! [1]

Only this month do we have support for output parameters from SQL Server
2000, and only in db-lib. Have a look at the dbrpc* functions and at
src/dblib/unittest/rpc.c. Also, just because I like you, here's the URL
to the db-lib docs:

http://manuals.sybase.com:80/onlinebooks/group-cn/cng1250e/dblib/@Generic__BookView
and
http://download.sybase.com/pdfdocs/cng1250e/dblib.pdf

You would not have liked doing this in tds. Also, particularly for
something simple like this, I think you'll find db-lib easy to grasp.

This is new code, and you'll definitely be the first HP/UX guinea pig.
Let us know how you fare.

Regards,

--jkl

[1] There are two ways to retrieve output parameters from a stored
procedure query. One is "exec myproc @param output". Send it as a normal
query (dbsqlexec) and fetch the results. While simple, it's considered
"deprecated", and Microsoft dropped support for it with SQL Server 2000
(actually with SP 3 for SQL Server 7.0).

The nondeprecated way is to use the "rpc" functions. They're designed for
remote procedure calls (asking Server A to execute a procedure on Server
B), but they work fine for asking Server A to execute a procedure on
Server A, too. And they provide a way to retrieve the values of output
parameters.





Archive powered by MHonArc 2.6.24.

Top of Page