[PHP-users 11592] Re: MSSQL、結果フィールドの文字制限について

Youichi Iwakiri php-users@php.gr.jp
Tue, 19 Nov 2002 15:26:07 +0900


いわきりです

masanobu@marche.ne.jp wrote in <20021119144647.A4A8.MASANOBU@marche.ne.jp> :
>現在MSSQL_xxx 関数を用いて、varchar(3600文字)のフィールドを読み書きし様としていますが、なぜか、255バイト以上文字が返ってきません。255バイト目まではちゃんと返ってくるのに。
>MSSQL側で@@TEXTSIZEや、php.ini内のmssql.textlengthとmssql.textsizeも、全
>部4096以上に設定して余裕をもたせているのに、どうもうまくいきません。良く
>見たら、mssql_fetch_fieldの結果オブジェクトのmax_lengthプロパティーをみ
>ると、フィールド自体は1024バイトとか4096バイトとかになっているにも関わら
>ず255になっています。なぜでしょうか??どなたかご教授おねがいします。

http://bugs.php.net/bug.php?id=11593
によると、未サポートの様です。

[14 Nov 2001 5:56pm] fmk@php.net 
The DB Library used for the MSSQL extension does not support char and
varchar columns with more than 256 characters.

char and varchar columns was extended from 256 to 8000 in SQL Server 7.0
but the DB library from Microsoft was not updated.

If you want to use wide columns use the text type.

Further textlimit only affects columns of type text. It has no effect on
char or varchar columns.

-- 
Youichi Iwakiri