Skip to Content.
Sympa Menu

freetds - [freetds] Issue sending xml to a mssql-2k stored proc using php5 (php4 work s)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Leonard, Carl" <cleonard AT whisolutions.com>
  • To: "'freetds AT lists.ibiblio.org.'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Issue sending xml to a mssql-2k stored proc using php5 (php4 work s)
  • Date: Tue, 6 May 2008 14:49:28 -0700

I've got a problem sending a XML parameter to a MSSQL stroed proc using php5
and freetds 0.63. This came up during testing for a move from php4 to php5.
It works fine under php4. I'm using mssql_query in php not the more proper
mssql_execute. It is only the XML field that is causing the issue.

A sample code fragment

$SQL = "exec stored_proc_name NULL, NULL,
'<status><id>5</id><id>6</id><id>8</id></status>', NULL, '01/01/2001',
'04/29/2008', 25, 1";
$rc = mssql_query($sSQL,$Link_ID);

This bombs with with php5, but works just fine using tsql or php4. The
error is a syntax error. (Incorrect syntax near ','.)

Wondering what should be tried next. The newer release .64 causes problems
with blank text fields so I can't really use that. Should I give one of the
release candidates a try? I've been waiting for the actual released
version.

I've turned on the Freetds logs and I can't hardly find a difference between
the tsql case and the php5 case. About the only significant difference is
that tsql connects with "TDS-library" and php5 connects with "DB-library."




Archive powered by MHonArc 2.6.24.

Top of Page