Skip to Content.
Sympa Menu

freetds - Re: [freetds] SP parameters

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] SP parameters
  • Date: Tue, 27 Jun 2006 21:01:39 -0400

Gustavo A. Gonzalez wrote:
> I think that the trouble is in load NULL parameter values with
> dbrpcparam, i dont know when pass 0 or -1 in datalen and maxlen
> parameters. Why it works fine on a 0.62.4 version of freetds and wont
> work on a 0.63 version?.

A lot of work has gone into parameter passing. It might have worked
"accidentally" before, or only with some servers. I don't remember. I
would expect the next version to be better, and in 0.65 (which is what
we're working on now) the db-lib functions all have tests at the beginning
to verify their inputs.

http://manuals.sybase.com:80/onlinebooks/group-cnarc/cng1110e/dblib/@Generic__BookView

"If the value of the RPC parameter is NULL, pass datalen as 0, even if
type is a fixed-length datatype."

maxlen is used only to describe the buffer you've allocated for output
parameters. It tells db-lib not to write more than maxlen bytes to the
address you provide in the value argument. For input parameters (or to
defeat the length-check on output parameters) use -1.

> I dont understand how load it with DBRPCPARAM.

I hope it's clear now. Say if it's not. :-)

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page