mssql TEXT datatype fields get truncated are 4096 bytes

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
Burndorfer
TestLink user
Posts: 2
Joined: Wed Sep 12, 2007 10:43 pm

mssql TEXT datatype fields get truncated are 4096 bytes

Post by Burndorfer »

I installed the mssql version and based on the fix for nVarchar fileds I switched them to TEXT fields. When these fileds get displayed they are truncated to 4096 via adodb-mssql.inc.php.
The method here is:
$f = @mssql_fetch_field($this->_queryID);
the $f object has the maxLength = 4096 even if the field is much larger.

In sqlserver they use the 'dataLength' function to determine field length instead of the basic 'len' function which is used for non blob data types.
Not sure if this might be coming into play here.

So things like the Notes fields associated to project etc only diplay the first 4096 bytes.

Are there any work arounds for this?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

Thanks for your help.
We have done very few tests on MSSQL.
Think the firts try to do is install last ADODB version (we are not using the last one)

1. would you mind report this as issue on MAntis?
2. Give some feedback if you do the suggested tests ?

regards
Burndorfer
TestLink user
Posts: 2
Joined: Wed Sep 12, 2007 10:43 pm

Found setting in PHP.ini to fix this

Post by Burndorfer »

in the mssql section of the php.ini I updated the following settings:
; Valid range 0 - 2147483647. Default = 4096.
;mssql.textlimit = 4096
mssql.textlimit = 2147483647

; Valid range 0 - 2147483647. Default = 4096.
;mssql.textsize = 4096
mssql.textsize = 2147483647

All the data now shows up.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

thanks, I will try to add this as note during installation process.
Post Reply