[freetds] Problem with stored proc and varchar parameters

bflood at tethermedia.com bflood at tethermedia.com
Thu Jul 13 21:44:57 EDT 2006


James,

Thanks. The problem was in the application. I was setting the ColumnSize
in the SQLBindParameter call to 0 as oppose to the proper length. Once I
set it properly it all worked. The same code worked on windows so I guess
windows treats it differently.

Anyway thanks for the pointer to the rpc.c unittest. That was a big help
in helping me track down my problem.

Brendan

>> From: bflood at tethermedia.com
>> Sent: Thursday, July 13, 2006 2:04 PM
>>
>> Where can I get the 0.63 tgz. The website only seems to have stable
>> and latest snapshot.
>
> I'll tell you where you can find 0.63, but first want to advise you.  I
> disagree that 0.64 cannot send parameters to stored procedures.  Among
> other things, FreeTDS's ODBC driver is used with DBD::ODBC and
> OpenOffice.org.  If varchar parameters were really a problem, we'd be
> very concerned.
>
> And if you *do* have a problem, you're unlikely to get help with 0.63
> from the developers at this point.
>
> Please look in src/odbc/unittests and see samples/odbc_rpc.pl.  If
> you're sure you're coding your application correctly, please provide as
> small a test case as you can, perhaps by modifiying one of the
> unittests.
>
> I just finished writing src/odbc/unittests/rpc.c.  It's only in current
> CVS; you can find it in any current snapshot.  If you simply build the
> snapshot (and don't install it), then run "make check" in
> src/odbc/unittests, then try "ldd rpc", I think you'll see that it's
> linked to your *installed* libraries.  If so, I would think that would
> be a good harness for you.  I tested it with 0.64 and it worked as of a
> few days ago.
>
> (I actually think the unit tests should be statically linked to the
> build tree, but in this case what I consider a bug could be more of a
> feature.)
>
> Now I'll answer your question.  On http://www.freetds.org/software.html
> (the software link on the main page) you'll see "Ibiblio.org   Main
> distribution site".  Click there and go to the "old" directory.  It's a
> positive gold mine of obsolete code.
>
> http://ibiblio.org/pub/Linux/ALPHA/freetds/
>
> Regards,
>
> --jkl
>
>
>> > bflood at tethermedia.com wrote:
>> >> Hi,
>> >>
>> >> I am new to freetds. I just downloaded stable version (0.64)
>> >> yesterday and have a simple ODBC app that I am trying to get
>> >> working on linux (connecting to SQL Server on a windows box).
>> >> I have a stored proc that takes a varchar (basically a string
>> >> of up to 10 chars). However when I execute it no character data
>> >> gets sent across the wire. If I change the proc to take an
>> >> INTEGER then it works (and I see the parm value in the TDS
>> >> stream).
>> >>
>> >
>> > Try version 0.63 I had the same problem with 0.64, going back to
>> > 0.63 solved the problem.  Perhaps also read this:
>> > http://kb.vankoperen.nl/freetds-problems.html
>
> -----------------------------------------
> The information contained in this transmission may be privileged and
> confidential and is intended only for the use of the person(s) named
> above. If you are not the intended recipient, or an employee or agent
> responsible
> for delivering this message to the intended recipient, any review,
> dissemination,
> distribution or duplication of this communication is strictly prohibited.
> If you are
> not the intended recipient, please contact the sender immediately by reply
> e-mail
> and destroy all copies of the original message. Please note that we do not
> accept
> account orders and/or instructions by e-mail, and therefore will not be
> responsible
> for carrying out such orders and/or instructions.  If you, as the intended
> recipient
> of this message, the purpose of which is to inform and update our clients,
> prospects
> and consultants of developments relating to our services and products,
> would not
> like to receive further e-mail correspondence from the sender, please
> "reply" to the
> sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas,
> New York,
> NY 10105.
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>





More information about the FreeTDS mailing list