Empty VARCHAR parameters converted to NULL

Joshua Lang <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAFTwDJRxoHJ+54ykN71qTZB48FLUowuasAFkTPitsgQVFFHRHg@mail.gmail.com>
In the latest version of FreeTDS-dblib (0.95.79) I'm passing rpc VARCHAR
parameters of 0 length, but non-NULL (empty strings). FreeTDS seems to turn
these into NULL values before passing them on to SQL Server. From what I've
read, it seems as if older databases didn't support passing empty strings,
but newer ones do? (i.e. TDS 7.0+ do support empty strings).

It seems as this is a known issue, but I was wondering if it is possible to
fix it for the newer versions of SQL server? E.g. in dbrpcparam() passing a
non-NULL pointer to the 'value' parameter and a 0 to 'datalen' would
indicate an empty string is desired if possible.

Thoughts?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.