0

I'm trying to serialize a table into XML by select .. for xml and then pass this result (always a single result) into my procedure (written in C# as DLL to a stored procedure).

To accomplish that I'm setting the result into a variable:

DECLARE @xml varchar(max)
select @xml=(select  * from table for xml)
execute db.dbo.procedure
  @xml
go

The problem is that I'm limited by the max of varchar, it's not big enough and my result might be as big as 50MB tops, what can I do instead? thanks.

0 Answers0