Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS and PHP: empty strings and NVARCHAR

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS and PHP: empty strings and NVARCHAR
  • Date: Thu, 7 Jul 2011 10:50:21 +0200

2011/7/4 Mattia <mattia AT p2pforum.it>:
> 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).
>

Yes, this breaks dblib compatibility. All documentation report datalen
== 0 as NULL input.

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

?? this should be not necessary, our dblib should convert to
SYBVARCHAR and PHP should be happy with given varchar... If this is
not true we should fix FreeTDS dblib instead.

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

This is a PHP patch, I think you should split patch and send them.

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

bye
freddy77




Archive powered by MHonArc 2.6.24.

Top of Page