Re: MS SQL Server problem

From: Date: Mon, 24 Feb 2003 13:43:34 +0000
Subject: Re: MS SQL Server problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136895@lists.php.net to get a copy of this message
Let me guess, your using NTEXT datatypes in one or more columns on that table right? It's not a big deal to work around this, just use: mssql_query("SELECT CAST(field1 AS TEXT) AS field1 FROM table;"); Essentially you have to cast your NTEXT colums (or any which could have more then 255 characters coming back), as TEXT's. I've never had any problem's doing it like this. On Mon, 2003-02-24 at 01:16, Mark Virtue wrote: This code works perfectly and returns all the data that I expect: mssql_pconnect($hostname, $username, $password) or die("blah blah"); mssql_select_db($dbName) or die("blah blah"); $result = mssql_query("select MyFieldName from MyTable"); But if I change the last line to this: $result = mssql_query("select * from MyTable"); I get the following warnings and no result is returned: Warning: mssql_query() [function.mssql-query]: message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) in c:\test.php on line 24 Warning: mssql_query() [function.mssql-query]: Query failed in c:\test.php on line 24 I am using 4.3.0 on WinXP. Any thoughts? Mark. -- Adam Voigt (adam@cryptocomm.com) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.general (#136895) next »