freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Setting for returned column size in FreeTDS?
- From: Ken Tozier <kentozier AT comcast.net>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Setting for returned column size in FreeTDS?
- Date: Fri, 18 Aug 2006 01:47:19 -0400
On Aug 18, 2006, at 1:03 AM, Frediano Ziglio wrote:
Il giorno gio, 17/08/2006 alle 18.11 -0400, Ken Tozier ha scritto:
Well I checked into this today and although I wasn't able to solve
the 255 character limit, I did discover that it only exists when
retrieving data from MSSQL. I can write large strings without problem
(Verified by looking at the database with Query Analyzer)
I don't know whether this is a FreeTDS issue or a MSSQL one but if it
sounds like a FreeTDS issue, what other steps would you recommend?
The actual usage scenario goes like this
1. Mac OS X application sends a request to a PHP script.
2. PHP script packages up the request into an SQL query and sends it
off to MSSQL
3a. If the request was an insert, it completes successfully
regardless of data length
3b. If the request is a select, I get back the full contents of
fields shorter than 255 characters but all fields 256 characters or
longer get truncated to 255
Of note is that all queries, both insert and select, work as expected
with MySQL so it's not a problem with the SQL (I do make the
necessary query syntax changes for MSSQL)
Thanks
Ken
As said is a configuration problem. Try with this line
putenv('TDSVER=7.0');
before PHP connection. You are using an old protocol that do no support
more than 255 characters on strings. You are able to insert more than
255 cause sql statements sent to server have not this limit.
freddy77
Thanks Freddy
I already set all copies on freetds.conf on our server to use
# A typical Microsoft SQL Server 2000 configuration
[MyServer2k]
host = <correct domain here>
port = 1433
tds version = 8.0
But it didn't work still getting 255 char truncation. I want to avoid environment variables as they are extremely confusing and hard to find for non unix folks and the maintainers for this project have even less unix experience than I do.
Unless I'm missing something, setting tds version = 8.0 should have fixed the problem but the fact that it didn't means there is some other hidden variable somewhere, perhaps not even in freetds that is causing the truncation.
Ken
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Lowden, James K, 08/15/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Ken Tozier, 08/17/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Frediano Ziglio, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Ken Tozier, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Daniel Fazekas, 08/18/2006
- Re: [freetds] Setting for returned column size in FreeTDS?, Ken Tozier, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Daniel Fazekas, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Ken Tozier, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Frediano Ziglio, 08/18/2006
- <Possible follow-up(s)>
- Re: [freetds] Setting for returned column size in FreeTDS?, ZIGLIO, Frediano, VF-IT, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Lowden, James K, 08/18/2006
- Re: [freetds] Setting for returned column size in FreeTDS?, Ken Tozier, 08/18/2006
-
Re: [freetds] Setting for returned column size in FreeTDS?,
Ken Tozier, 08/17/2006
Archive powered by MHonArc 2.6.24.