Skip to Content.
Sympa Menu

freetds - [freetds] php ntext/nvarchar problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lorenz, Marcus" <Marcus.Lorenz AT unilever.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] php ntext/nvarchar problems
  • Date: Tue, 2 Jun 2009 17:17:14 +0100

Hello everybody,

i'm probably the millionth person who has problems fetching ntext fields
from an mssql 2005 server db.
I have read (nearly) all posts i could find regarding problems with the
protocol if have to use (8.0) and the set textsize options.
But i'm still unable to retrieve any data from such fields. They are
only empty. All other data is retrieved fine.

I have set text size within the freetds.conf to 65535 (see below).

These are my php commands on top of anything else:
ini_set('mssql.textlimit','65535');
ini_set('mssql.textsize','65535');
ini_set('odbc.defaultlrl','65535');

Within the phpinfo() these values are used as local value for their
specific keys.

Directly after establishing a connection to the server i execute
set textlimit 65535.

Before executing the statement that uses the ntext-field i have check
the size with:

select @@TEXTSIZE as 'abc' and abc turns out to be 65535

Here is my freetds.conf (a part of it):

[TransactionHub_freeTDS]
tds version = 8.0
host = XXXX
port = 10464
text size = 65535
client charset = UTF-8

And the odbc.ini:

[TransactionHub]
Driver = /usr/lib/libtdsodbc.so.0
Description = v0.64 with protocol v8.0
Trace = No
Servername = TransactionHub_freeTDS
Database = XXXX
UID = XXXX

[Default]
Driver = /usr/lib/libtdsodbc.so.0

Within the trace i can see my query and the data of the field:

|..P.R.O. C.E.D.U.|
|R.E.1._. S.T.A.R.|
|T. .

Well this is just a part of it. If needed i can attach the whole part.

The only thing that is left is the freetds version which is 0.64 from
the rpm. I haven't found a hint that this problem is related to this
version.
Unlikely i have to ask our IT to compile this and this is always a
little bit tricky. ;)

So any help would be great, even if its a "look here"...

Thanks

Marcus



  • [freetds] php ntext/nvarchar problems, Lorenz, Marcus, 06/02/2009

Archive powered by MHonArc 2.6.24.

Top of Page