If you want to pass table in form of XMLin asp.net

1st build xml data and pass it....
dt.TableName = "MyData";
using (StringWriter sw = new StringWriter())
            {
                dt.WriteXml(sw);
                result = sw.ToString().Replace("NewDataSet", "DocumentElement");
            }

2nd in proc you can get by select ...
 SELECT  cast(colx.query('data(Column1) ') as nvarchar(max)) as Column1,     
   cast(colx.query('data(Column2) ' )as nvarchar(max)) as Column2,     
   cast(colx.query('data(Column3) ' )as nvarchar(max)) as Column3    
   into #Temp from @MyData1.nodes('DocumentElement/MyData') as Tabx(colx)


Comments

Popular posts from this blog

Executing PowerShell scripts from C#

HOW TO Use the NumericUpDown Control

Exposing Agile Software Development Myths