Chop CHAR_P to 4096 bytes? PHP to MSSQL via FreeTDS
tetherow at nol.org
tetherow at nol.org
Fri Jun 2 11:10:07 EDT 2000
On 2 Jun, James Cameron wrote:
> G'day,
>
> My data is being truncated to 4096 bytes.
> PHP 3.0.15 to Microsoft SQL Server via FreeTDS from CVS.
>
> I'm developing something based on a stored procedure name provided to
> me, about which the author states "returns two fields, case_id
> (CHAR_P:255) and case_history (CHAR_P - Multi Line field)".
>
> Using PHP's sybase_fetch_row function shows the field returning with a
> length of 4096 bytes. The sybase_fetch_field function also says 4096.
>
> I went looking at php-3.0.15/functions/sybase.c and at freetds/src/dblib
> and freetds/src/tds but was unable to find any significant reference to
> 4096 bytes. Is there such a limit? If so, where can I adjust it?
>
> Is it possible that the author has made this limit?
I believe Brian has already answered this one.
> Is it possible to read the stored procedure via FreeTDS?
I would really like to hear the answer to this one.
> Can you get a list of tables and columns via FreeTDS?
Try invoking the stored procedures 'sp_tables' for a list of know tables
in the database and 'sp_columns tablename' for the columns in the
table. I know these work in MSSQL but am unsure as to whether sybase
is the same.
------------------------------------------------------------------------
Sam Tetherow tetherow at nol.org
Director of Development
Nebrask@ Online http://www.nol.org/
More information about the FreeTDS
mailing list