Discussion:
[freetds] FreeTDS Digest, Vol 134, Issue 5
sales
2014-03-29 18:12:51 UTC
Permalink
I noticed that the only way to pass and receive parameters is using TDS 4.1.
How do we do this using newer TDS versions? I have failed to do that.
I use unixODBC with FreeTDS underneath.


--------- Original Message --------- Subject: FreeTDS Digest, Vol 134, Issue 5
From: freetds-request at lists.ibiblio.org
Date: 3/29/14 12:00 pm
To: freetds at lists.ibiblio.org

Send FreeTDS mailing list submissions to
freetds at lists.ibiblio.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ibiblio.org/mailman/listinfo/freetds
or, via email, send a message with subject or body 'help' to
freetds-request at lists.ibiblio.org

You can reach the person managing the list at
freetds-owner at lists.ibiblio.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of FreeTDS digest..."


Today's Topics:

1. Re: dblib and output parameters of stored procedures
(James K. Lowden)


----------------------------------------------------------------------

Message: 1
Date: Fri, 28 Mar 2014 19:28:29 -0400
From: "James K. Lowden" <jklowden at freetds.org>
To: freetds at lists.ibiblio.org
Subject: Re: [freetds] dblib and output parameters of stored
procedures
Message-ID: <20140328192829.210db591.jklowden at freetds.org>
Content-Type: text/plain; charset=US-ASCII

On Thu, 27 Mar 2014 13:09:15 +0100
I am trying work with output parameters of stored procedures using
FreeTDS dblib
dbnumrets()
but it still returns 0
(same example tested with Microsoft ntwdblib returns 1)
Check the FAQ; you need to use the rpc functions to get the server to
return output parameters.

ntwdblib uses TDS 4.2. I guess the server still answers the old way on
the old protocol.

HTH.

--jkl




------------------------------

_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


End of FreeTDS Digest, Vol 134, Issue 5
***************************************
Frediano Ziglio
2014-03-29 19:04:21 UTC
Permalink
You have to use call syntax, see funccall test for instance. Mainly
you have to prepare (SQLPrepare) a query like "{call sp_name(?,?)}",
bind the parameters (2 in this example) and execute the query.

Frediano
Post by sales
I noticed that the only way to pass and receive parameters is using TDS 4.1.
How do we do this using newer TDS versions? I have failed to do that.
I use unixODBC with FreeTDS underneath.
--------- Original Message --------- Subject: FreeTDS Digest, Vol 134, Issue 5
From: freetds-request at lists.ibiblio.org
Date: 3/29/14 12:00 pm
To: freetds at lists.ibiblio.org
Send FreeTDS mailing list submissions to
freetds at lists.ibiblio.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ibiblio.org/mailman/listinfo/freetds
or, via email, send a message with subject or body 'help' to
freetds-request at lists.ibiblio.org
You can reach the person managing the list at
freetds-owner at lists.ibiblio.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of FreeTDS digest..."
1. Re: dblib and output parameters of stored procedures
(James K. Lowden)
----------------------------------------------------------------------
Message: 1
Date: Fri, 28 Mar 2014 19:28:29 -0400
From: "James K. Lowden" <jklowden at freetds.org>
To: freetds at lists.ibiblio.org
Subject: Re: [freetds] dblib and output parameters of stored
procedures
Message-ID: <20140328192829.210db591.jklowden at freetds.org>
Content-Type: text/plain; charset=US-ASCII
On Thu, 27 Mar 2014 13:09:15 +0100
I am trying work with output parameters of stored procedures using
FreeTDS dblib
dbnumrets()
but it still returns 0
(same example tested with Microsoft ntwdblib returns 1)
Check the FAQ; you need to use the rpc functions to get the server to
return output parameters.
ntwdblib uses TDS 4.2. I guess the server still answers the old way on
the old protocol.
HTH.
--jkl
------------------------------
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
End of FreeTDS Digest, Vol 134, Issue 5
***************************************
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
Loading...