Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 store procedure using XML...help

Author  Topic 

bluestar
Posting Yak Master

133 Posts

Posted - 2008-09-16 : 19:13:56
hello

I have a grid view having 2 columns,id and name.
user will insert multiple records in the gridview.and this should finally be stored in table.

Can somebody please help me,how to write a stored procedure for this using XML.I have no idea how to handle xml variable.

Thank You

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-16 : 23:58:49
Pass the multiple records as XML to stored procedure as a parameter. Make use of OPENXML feature in stored procedure to parse the XML and store inidividual values to table.Refer below for syntax of OPENXML.

[url]http://msdn.microsoft.com/en-us/library/aa276847(SQL.80).aspx[/url]
Go to Top of Page
   

- Advertisement -