Good day to all!
In MSSQL, I created a procedure (Function1) that pushes xml content, and it already drives it into a table.
EXEC [master].[dbo].sp_xml_preparedocument @DocID OUTPUT, @xml SELECT * FROM openxml(@DocID, 'bla/bla', 2)
On php I call this procedure.
$fileContent = file_get_contents(iconv('utf-8', 'cp1251', $fileName)); $data = Yii::app()->db->createCommand('EXEC Function1 :xml')->bindValue('xml', $fileContent)->queryRow();
Well, I get, actually, such an error:
SQLSTATE[IMSSP]: An error occurred translating string for input param 1 to UCS-2
Who-thread faced with a similar error?
$fileName
to UCS-2 (UTF-16). - i-one