R
randall g
I have a stored procedure which returns multiple result sets, enclosing
each in its own tag. This works in ADO but not ADO.NET, where an error
is returned by ExecuteXmlReader:
"Invalid command sent to ExecuteXmlReader. The command must return an
Xml result."
The procedure looks like this:
create procedure xxx as
select '<tag1>'
select * .... for xml auto
select '</tag1>'
select '<tag2>'
select * .... for xml auto
select '</tag2>'
select '<tag3>'
select * .... for xml auto
select '</tag3>'
return
go
It is the "select 'literal'" statements that cause the problem, however
this works perfectly well in ADO.
How can I control the XML tagging for multiple result sets, in ADO.NET?
each in its own tag. This works in ADO but not ADO.NET, where an error
is returned by ExecuteXmlReader:
"Invalid command sent to ExecuteXmlReader. The command must return an
Xml result."
The procedure looks like this:
create procedure xxx as
select '<tag1>'
select * .... for xml auto
select '</tag1>'
select '<tag2>'
select * .... for xml auto
select '</tag2>'
select '<tag3>'
select * .... for xml auto
select '</tag3>'
return
go
It is the "select 'literal'" statements that cause the problem, however
this works perfectly well in ADO.
How can I control the XML tagging for multiple result sets, in ADO.NET?