Page 1 of 1

Generating xml from an mssql db

Posted: Thu Jan 26, 2006 12:19 am
by mikeee
Here is the query:

$sql = "SELECT * FROM Keyword FOR XML AUTO";

The FOR XML AUTO is the MS extension to SQL.

After executing the above query I get the following result:

Array (
[0] => 00000
[1] => 10007
[2] => 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.
[10007] (severity 5) [(null)]
[3] => -1
[4] => 5 )

Any one familiar with this problem?
I'm thinking that is just that PHP does not support all of MSSQL features.
Or...?

Here are some specifics:
OS = XP Pro
Web Server = Apache 2.x
MSSQL
PHP = 5.1.x

I've used PHP extensions PDO and mssql. Both give the same result.
The query runs fine without the "FOR" clause.

Thanks, Mike

Posted: Thu Jan 26, 2006 4:38 am
by raghavan20
[2] => 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.
Looks like the data you are trying to get in the array is not a set of Unicode characters 8O