Ominous mssql 'FOR XML AUTO' error - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > Perl » Ominous mssql 'FOR XML AUTO' error


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-12-2006   #1 (permalink)
jordan
Member
 
Join Date: Jul 2006
Age: 44
Posts: 31
Default Ominous mssql 'FOR XML AUTO' error

WARNING, this could be a long post as I am going to attempt to put everything in here...

I have searched and still cannot get a resolution for this error relating to using php5 and mssql driver;

PHP Warning: mssql_query() [<a href='function.mssql-query'>function.mssql-query</a>]: 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 <file>


the sql query has been trimmed down to;

select cast((fname + ' ' + lname) as text) as name from user for xml auto

Note that the casting was done due to some reference to ntext not being supported and this was a supposed fix for the error.


and the php code for the call is:

function altLoadData()
{

if(defined('DB_DEBUG') && DB_DEBUG == 1)
error_log(__FUNCTION__ . " Attempting to connect '" . DB_HOSTNAME . "' to use database '" . DB_DATABASE . "'");

if($this->sql_statement == NULL)
{
error_log(__FUNCTION__ . " sql statement is NULL");
return false;
}


$db = mssql_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD) ;
$d = mssql_select_db(DB_DATABASE, $db);

$res = mssql_query($this->sql_statement, $db);

$row = mssql_fetch_array($res);
$this->sql_result = $row[0];


if(defined('DB_DEBUG') && DB_DEBUG == 1)
error_log(__FUNCTION__ . " RESULT'" . $this->sql_result . "'");

if( !$this->sql_result )
{
if(defined('DB_DEBUG') && DB_DEBUG == 1)
error_log(__FUNCTION__ . " Failed attempting to execute '" . $this->sql_statement . "'");

return false;
}

if(defined('DB_DEBUG') && DB_DEBUG == 1)
error_log(__FUNCTION__ . " SQL result '" . $this->sql_result. "'");

$this->bIsModified = false;
return true;

}
Most notable code is bolded above and now the big question, has anyone ran into this before? I haven't seen many references to php and the FOR XML AUTO stuff out there. As well there seems to be a fix available in Microsoft land (ASP, .net) and java land that is in the connetion string setting selectMethod=direct vs. SelectMethod=cursor. is there a window to be able to do this in php?

thanks in advance for any help as I know this can be a lot to digest
Jordan
jordan is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Surfing shavei7 E-Commerce 21 07-22-2008 07:31 AM
How good can Auto-Surf be for advertisement? Life Xpect Marketing 12 10-11-2006 09:59 PM
What HTTP error is generated when there is an error in an ASP page? agaba175 ASP 0 08-05-2006 08:25 PM
auto connect with net::telnet emily Perl 0 07-08-2006 06:43 PM
Auto Welcoming System. The Kidd Forum Management 2 01-22-2006 01:04 PM


footer left
All times are GMT. The time now is 08:16 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Mortgage Calculator | Bad Credit Mortgages | Internet Advertising | Mobile Phones | Mortgage Calculator

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49