Generating xml from an mssql db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mikeee
Forum Newbie
Posts: 1
Joined: Wed Jan 25, 2006 10:09 pm

Generating xml from an mssql db

Post 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
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post 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
Post Reply