freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Harrison, Bruce (CXO)" <Bruce.Harrison AT hp.com>
- To: <freetds AT lists.ibiblio.org>
- Cc: <jklowden AT schemamania.org>
- Subject: RE: [freetds] ct-lib Documentation
- Date: Fri, 13 Dec 2002 08:53:04 -0700
Hello James,
As always, thanks for the reply and help!
>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.
Actually I had it working on Linux (using the tds library), with the
build (non-snapshot) that I pulled on Nov. 22. The SQL query that I was
sending (and its output) is as follows:
declare @case_id varchar(15)
declare @case_status varchar(7)
exec test_feeder 'Cleared','LEG','test_node','CIM:test','Add. Text
Here','harrison',@case_id output,@case_status out
select @case_id AS 'Case Id', @case_status AS 'Case Status'
Case Id Case Status
036361-120402 Updated
>This is new code, and you'll definitely be the first HP/UX guinea pig.
>Let us know how you fare.
As you know, I haven't been shy about letting you know how I'm doing on
HP/UX!
It sounds as if db-lib is the API that I should be using rather than the
ct-lib API????
James and all -> Keep up the good work!
Bruce Harrison
Consultant
Hewlett-Packard Company
Colorado Springs, CO
(719) 592-4513
-----Original Message-----
From: James K. Lowden [mailto:jklowden AT schemamania.org]
Sent: Thursday, December 12, 2002 10:16 PM
To: freetds AT lists.ibiblio.org
Subject: Re: [freetds] ct-lib Documentation
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/@Generi
c__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.
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] ct-lib Documentation,
Harrison, Bruce (CXO), 12/12/2002
- Re: [freetds] ct-lib Documentation, James K. Lowden, 12/13/2002
- <Possible follow-up(s)>
- RE: [freetds] ct-lib Documentation, Harrison, Bruce (CXO), 12/13/2002
-
RE: [freetds] ct-lib Documentation,
Lowden, James K, 12/13/2002
- RE: [freetds] ct-lib Documentation, Brian Bruns, 12/13/2002
- RE: [freetds] ct-lib Documentation, Thompson, Bill D (London), 12/13/2002
Archive powered by MHonArc 2.6.24.