there are same problem with VARBINARY, if you are forced to use existing database with such fields you can do it like this:
SELECT CAST(master.dbo.fn_varbintohexstr(VARBINARYFIELD) AS TEXT) FROM table;
mssql_field_length
(PHP 4, PHP 5, PECL odbtp:1.1.1-1.1.4)
mssql_field_length — Retorna o tamanho de um campo
Descrição
int mssql_field_length
( resource $result
[, int $offset
] )
Esta função irá retornar o tamanho do campo número offset no conjunto de resultados result . Se offset for omitido, o campo atual é usado.
Nota: Nota para os usuários de Win32
Devido a uma limitação da API usada pelo PHP (MS DbLib C API), o tamanho de campos VARCHAR é limitado em 255. Se você precisar guardar mais dados, use um campo TEXT.
mssql_field_length
zz(lost dot childz at gmail dot com)
31-Oct-2007 04:41
31-Oct-2007 04:41
08-Feb-2005 01:56
You can also work around this limitation with the following:
-- for example, with MyVarCharField VARCHAR(1000)
SELECT CAST(MyVarCharField AS TEXT) FROM MyTable
