473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Edit a SQL Server 2005 XML column in ASP.NET

Hi. I've been trying to figure this out for a couple weeks now and have posted various pleas for help, but so far I've not been able to find the magic I need to make this happen. This can't be too uncommon of a scenario. Certainly someone has done this before.

What I'm trying to do is the following:

1. Pull XML from an MS SQL Server 2005 XML column.
2. Load it into a DataSet (unless there's a better way).
3. Bind it to some ASP.NET control(s) for editing.
4. Allow user to editing of the data in the web page.
5. Get the updated data from the control(s) as XML
6. Post it back to the SQL XML column.

I can do 1-4 above... but for the life of me can't get step 5 to work.

Does someone have a simple bare-bones example of the above 6 steps actually working that they can post for me to examine/review?
--
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )
May 23 '07 #1
3 960
Greg Collins [Microsoft MVP] wrote:
Hi. I've been trying to figure this out for a couple weeks now and have posted various pleas for help, but so far I've not been able to find the magic I need to make this happen. This can't be too uncommon of a scenario. Certainly someone has done this before.

What I'm trying to do is the following:

1. Pull XML from an MS SQL Server 2005 XML column.
2. Load it into a DataSet (unless there's a better way).
3. Bind it to some ASP.NET control(s) for editing.
4. Allow user to editing of the data in the web page.
5. Get the updated data from the control(s) as XML
6. Post it back to the SQL XML column.

I can do 1-4 above... but for the life of me can't get step 5 to work.

Does someone have a simple bare-bones example of the above 6 steps actually working that they can post for me to examine/review?

Hi, Greg
check out this:
http://msdn2.microsoft.com/en-us/library/58a18dwa.aspx

What's exactly your case - you need to serialize the whole dataset,
or a given column ?

Regards,
Petar Atanasov
http://a-wake.net
May 23 '07 #2
Use a table for the values on the form instead of XML? :-))

--
TheSQLGuru
President
Indicium Resources, Inc.

"Greg Collins [Microsoft MVP]" <gcollins_AT_msn_DOT_comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
Hi. I've been trying to figure this out for a couple weeks now and have
posted various pleas for help, but so far I've not been able to find the
magic I need to make this happen. This can't be too uncommon of a scenario.
Certainly someone has done this before.

What I'm trying to do is the following:

1. Pull XML from an MS SQL Server 2005 XML column.
2. Load it into a DataSet (unless there's a better way).
3. Bind it to some ASP.NET control(s) for editing.
4. Allow user to editing of the data in the web page.
5. Get the updated data from the control(s) as XML
6. Post it back to the SQL XML column.

I can do 1-4 above... but for the life of me can't get step 5 to work.

Does someone have a simple bare-bones example of the above 6 steps actually
working that they can post for me to examine/review?
--
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )

May 23 '07 #3
KJ
What about using the WriteXml method of the DataSet after the changes are
made to it? Does that do anything useful?

"Greg Collins [Microsoft MVP]" <gcollins_AT_msn_DOT_comwrote in message
news:us**************@TK2MSFTNGP06.phx.gbl...
Hi. I've been trying to figure this out for a couple weeks now and have
posted various pleas for help, but so far I've not been able to find the
magic I need to make this happen. This can't be too uncommon of a scenario.
Certainly someone has done this before.

What I'm trying to do is the following:

1. Pull XML from an MS SQL Server 2005 XML column.
2. Load it into a DataSet (unless there's a better way).
3. Bind it to some ASP.NET control(s) for editing.
4. Allow user to editing of the data in the web page.
5. Get the updated data from the control(s) as XML
6. Post it back to the SQL XML column.

I can do 1-4 above... but for the life of me can't get step 5 to work.

Does someone have a simple bare-bones example of the above 6 steps actually
working that they can post for me to examine/review?
--
Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )

May 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
3
by: Leo | last post by:
I have a datagrid with the first column as a Edit,Update,Cancel button column. The other 5 columns are template columns. When I click the Edit button in IE6 the row correctly displays the...
7
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the...
2
by: =?Utf-8?B?Z2FuZQ==?= | last post by:
Hi, In a gridview, How can i display different columns between item and edit modes. For eg. i have a sql that returns productname, categoryname, etc. In viewmode, i need to display only...
1
by: rogerford | last post by:
I have a grid which i bind with values from Database. I have events to edit and update the grid. I am not using SqlDatasource to connect to DB. Rather i am doing the updating of the grid...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.