[PHP] Re: Getting only 255 chars from SQL Server

2002-05-21 Thread Philip Hallstrom

A long time ago I had this problem and discovered a checkbox in the ODBC
configuration wizard with NT where you could specify how many chars of a
varcar to return...

you might look there...

On Mon, 20 May 2002, Tim Greenleaf wrote:

 FYI:  MS SQL Server 7 and greater, Varchar is a max of 8000 characters so it
 sounds like there is some limitation in the PHP functions that is limiting
 this.
 Niklas lampén [EMAIL PROTECTED] wrote in message
 008901c1fa7b$14539d30$ba93c5c3@Niklas">news:008901c1fa7b$14539d30$ba93c5c3@Niklas...
  The platform doesn't matter here, since VarChar's maximum length is 255
  chars, so everything above that is cutted away on insert.
  Creating table with VarChar(800) should give an error..
 
 
  Niklas
 
 
  -Original Message-
  From: Michael Sims [mailto:[EMAIL PROTECTED]]
  Sent: 13. toukokuuta 2002 15:32
  To: [EMAIL PROTECTED]
  Subject: Re:  Getting only 255 chars from SQL Server
 
 
  On Sun, 12 May 2002 18:43:47 -0700, you wrote:
 
  I have an SQL Server database running on a server on the internet. I
  need to have php connecting to the db and returning values. Simple
  stuff. No problem making the connection and getting data using the
  mssql
  functions. The weird thing is that 4 of the fields in the table are
  vchar fields of length 800. When getting the data from the db for the
  web page, all that gets returned are the first 255 characters of each
  field.
 
  Are you using FreeTDS on *nix, or is this a Windows server making the
  connection?
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Getting only 255 chars from SQL Server

2002-05-13 Thread Craig

Varchar can only be set to a maximum of 255
Try setting the column  to long text
Unknown Sender [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have an SQL Server database running on a server on the internet. I
 need to have php connecting to the db and returning values. Simple
 stuff. No problem making the connection and getting data using the mssql
 functions. The weird thing is that 4 of the fields in the table are
 vchar fields of length 800. When getting the data from the db for the
 web page, all that gets returned are the first 255 characters of each
 field. If I use a SQL client to check the db, I see that all 800
 characters are there. And if I use ASP pages I can get all 800
 characters returned on the web page, but using php only gets the first
 255. I used some php column length functions on the page and it shows
 those 4 fields as length 255.(??)
 Am I missing something? Does php have a limit on the number of
 characters returned from a field? I can use ASP to write the pages I
 guess, but I don't know why php wouldn't work.

 Thanks,
 Dave




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php