ms sql - length limit?

admin

Administrator
Staff member
hi, please:

yesterday i've posted a question in this forum called 'odbc 4096 length limit?!?' - but for the meantime no answer..

so: once again - but i used direct connection to MS SQL (ver.7) server, not via ODBC. look at the following code:

$re=mssql_query("select DATALENGTH(dataset) from TDATA where id_dataset=3215");
list($len)=mssql_fetch_row($re);
echo "DATALENGTH $len<br>";

$re=mssql_query("select dataset from TDATA where id_dataset=3215");
list($data)=mssql_fetch_row($re);
echo "DATA STRLEN ".strlen($data)."<br>";

- where dataset is type TEXT and contains only textdata...

results in
DATALENGTH 57802
DATA STRLEN 4096

WHY?!? in database, the column dataset contains really 57802 bytes, but in php i could receive only first 4096.

is there any help, please?

thank you, robert
 
Back
Top