Problem with Execute SQL task populating an XML result set

Who is online?  0 guests and 0 members
Home  »  Forums   »  microsoft business intelligence   »  integration services   » Problem with Execute SQL task populating an XML result set

Problem with Execute SQL task populating an XML result set

Topic RSS Feed

Posts under the topic: Problem with Execute SQL task populating an XML result set

Posted: 4/13/2012

Jedi Youngling 19  points  Jedi Youngling
  • Joined on: 10/24/2011
  • Posts: 7

I'm trying to populate an XML result set from an execute sql task which I then use to populate a HTML page. The SQL involved using for xml auto works fine in ssms but I can't get it to work in SSIS 2008. The only clue is that, when I click on build query in the execute SQL task it states "The EXEC SQL construct or statement is not supported." I initially populated the SQL query from a variable but it stated something along the lines of "Compound queries are not allowed". I tried converting the SQL command therefore to a stored procedure and attempted to call that from the Execute SQL task but with the above result.

My execute sql task has:

ResultSet = XML
ConnectionType = OLE DB
SQLSourceType = Direct input
SQLStatement = EXEC [dbo].[sp_GetSSISPackageLog] @executionid = ?

And in parameter mapping:

Variable=  System::ExecutionInstanceGUID
Direction = Input
Data Type = NVARCHAR
Parameter Name = 0
Parameter Size = -1

Any ideas where I'm going wrong please?

I see IsQueryStoredProcedure is False but also grayed out for some readon, if that's any indication.


Posted: 4/17/2012

Jedi Master 5325  points  Jedi Master
  • Joined on: 10/27/2009
  • Posts: 298

IsQueryStoredProcedure is greyed out unless you choose ADO as the connection type.

Make sure you dont have any GO statements in your query.

 


tags XML

Posted: 4/18/2012

Jedi Youngling 19  points  Jedi Youngling
  • Joined on: 10/24/2011
  • Posts: 7

Thanks for the reply Mike. There are no Go statements in the query unfortunately so this isn't the fix.


Page 1 of 1 (3 items)