tags:

views:

2751

answers:

4

I have a table with an XML column. This column is storing some values I keep for configuring my application. I created it to have a more flexible schema. I can't find a way to update this column directly from the table view in SQL Management Studio. Other (INT or Varchar for example) columns are editable. I know I can write an UPDATE statement or create some code to update it. But I'm looking for something more flexible that will let power users edit the XML directly.

Any ideas?

Reiterating again: Please don't answer I can write an application. I know that, And that is exactly what I'm trying to avoid.

+1  A: 

I do not think you can use the Management Studio GUI to update XML-columns without writing the UPDATE-command yourself.

One way you could let users update xml-data is to write a simple .net based program (winforms or asp.net) and then select/update the data from there. This way you can also sanitize the data and easily validate it against any given schema before inserting/updating the information.

Espo
+2  A: 

I wound up writing a .net c# UI to deal with the xml data. Using xsl for display and an xml schema helped display the xml nicely and maintain it's integrity.

edit: Also c# contains the xmldocument class that simplifies reading/writing the data.

Paulj
A: 

I'm a bit fuzzy in this are but could you not use the OPENXML method to shred the XML into relational format then save it back in XML once the user has finished?

Like others have said I think it might be easier to write a small app to do it!

Almond
I know I can write an app. I mentioned it in the question :)Editing values in the table view directly has its benefits. If I can do it for numbers and strings, I would like to do it for XML too.
Ron Harlev
A: 

sql server management studio is missing this feature.

I can see Homer Simpson as the Microsoft project manager banging his head with the palm of his hand: "Duh!"

Of course, we want to edit xml columns.

Todd