Comments on: SQL Server Implicit String Conversion/Concatenation (XML parsing: line <x>, character <y>, unexpected end of input) https://www.chinhdo.com/20100220/sql-server-concatenation/ Chinh's semi-random thoughts on software development, gadgets, and other things. Sun, 15 Mar 2020 03:57:04 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: SqlDev https://www.chinhdo.com/20100220/sql-server-concatenation/comment-page-1/#comment-431230 Fri, 30 May 2014 20:16:16 +0000 https://www.chinhdo.com/20100220/sql-server-concatenation/#comment-431230 I am facing the same problem. When I run the code in SSMS it works absolutely fine but as soon as I create a job for it, it breaks with error:

Line: 1 : Error message XML parsing: line 20, character 14, unexpected end of input : Error number 9400

Can someone please help me with this?
{code}
IF OBJECT_ID(‘tempdb..#xml’) IS NOT NULL DROP TABLE #xml
CREATE TABLE #xml ( MyXML xml )

Select @url = “MyURL”
exec sp_OACreate ‘MSXML2.XMLHTTP’, @xmlObject OUT;
exec sp_OAMethod @xmlObject, ‘open’, NULL, ‘get’, @url, ‘false’
exec sp_OAMethod @xmlObject, ‘send’

INSERT into #xml ( MyXML )
EXEC sp_OAGetProperty @xmlObject, ‘responseXML.xml’–, @Response OUT

Exec sp_OADestroy @xmlObject
{code}

]]>
By: Soroush https://www.chinhdo.com/20100220/sql-server-concatenation/comment-page-1/#comment-413530 Thu, 27 Mar 2014 19:06:26 +0000 https://www.chinhdo.com/20100220/sql-server-concatenation/#comment-413530 I have a problem here:

When I run this query in SSMS, everything works fine , but as soon as I run this as a job , it starts failing with no obvious error:

XML parsing: line 1 character 484 unexpected end of input [SQLSTATE 42000] (Error 9400).

I just hope someone can have a solution for this.

]]>
By: Chinh Do https://www.chinhdo.com/20100220/sql-server-concatenation/comment-page-1/#comment-179134 Fri, 28 Sep 2012 12:21:28 +0000 https://www.chinhdo.com/20100220/sql-server-concatenation/#comment-179134 In reply to shiva.

Shiva: Thanks for leaving a note.

]]>
By: shiva https://www.chinhdo.com/20100220/sql-server-concatenation/comment-page-1/#comment-179130 Fri, 28 Sep 2012 11:56:28 +0000 https://www.chinhdo.com/20100220/sql-server-concatenation/#comment-179130 Nice….one saved my time..

]]>
By: Paul https://www.chinhdo.com/20100220/sql-server-concatenation/comment-page-1/#comment-168598 Tue, 31 Jul 2012 21:18:48 +0000 https://www.chinhdo.com/20100220/sql-server-concatenation/#comment-168598 excellent response to a specific problem, congratulations

]]>