I have a SQL Server database with a column of type XML. I've been looking about for ways to populate it using an INSERT query / stored procedure from asp.net.
So far all I can find is ways to get (SELECT) the XML data and execute an SqlDataReader / XMLReader (such as this example)
How can I go about populating the column from ASP.NET? The xml will look something like the following:
<remarks>
<remark>
<author>...</author>
<date>...</date>
<content>...</content>
</remark>
<remark>
<author>...</author>
<date>...</date>
<content>...</content>
</remark>
</remarks>
The 'content' will be entered by a user in a textbox, and the other columns will be populated using DateTime.Now() and User.Identity.Name.
I am looking to be able to:
- Enter a first remark into an empty XML column.
- Enter additional remarks at a later time.
Can this be done? I can't manage to find any information on this.