FreeTDS and PHP: empty strings and NVARCHAR

Mattia <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CA+heTbrGqdEAvHDDhN1ee4WfEmT8dG0+y23rAHbhoCyoQ9W_NA@mail.gmail.com>
Hi,
yesterday I modified PHP and FreeTDS codes to make them work with empty
strings and nvarchar in stored procedures.

1. The empty_string.patch (against actual cvs of FreeTDS) is like the ct-lib
patch (so datalen==0 is not null).

2. The nvarchar_export.patch defines XSYBNVARCHAR in sybdb.h (to use
with php).

3. The freetds092_with_nvarchar.patch (against php 5.3.6 stable) fixes a
redefinition of type LBYTE to work with actual Freetds cvs and adds support
for type SQLNVARCHAR (to use with mssql_bind function).

The first patch could break the dblib standard so it could remain an unofficial
patch.

The second one shouldn't cause problems. It could be merged in the main
tree.

I hope I have done something useful.

Regards

-- 
Mattia
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.