Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2007

Tip: Looking for answers? Try searching our database.

Edit a SQL Server 2005 XML column in ASP.NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Collins [Microsoft MVP] - 23 May 2007 12:40 GMT
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?

Signature

Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )

xyb - 23 May 2007 13:29 GMT
On 5 23 ,   7 40 , "Greg Collins [Microsoft MVP]"
<gcollins_AT_msn_DOT_com> 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.
>
[quoted text clipped - 14 lines]
> Greg Collins [Microsoft MVP]
> Visit Braintrove (http://www.braintrove.com)

4. Allow user to editing of the data in the web page.
Here i think we can use javascript DOM to modify xml document
according to user's edit.
5. Get the updated data from the control(s) as XML
And now we can get the xml document of step 4.
6. Post it back to the SQL XML column.
:) here have nothing to consider.

Hope this can help.
xyb - 23 May 2007 13:30 GMT
On 5 23 ,   7 40 , "Greg Collins [Microsoft MVP]"
<gcollins_AT_msn_DOT_com> 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.
>
[quoted text clipped - 14 lines]
> Greg Collins [Microsoft MVP]
> Visit Braintrove (http://www.braintrove.com)

4. Allow user to editing of the data in the web page.
Here i think we can use javascript DOM to modify xml document
according to user's edit.
5. Get the updated data from the control(s) as XML
And now we can get the xml document of step 4.
6. Post it back to the SQL XML column.
:) here have nothing to consider.

Hope this can help.
xyb - 23 May 2007 13:30 GMT
On 5 23 ,   7 40 , "Greg Collins [Microsoft MVP]"
<gcollins_AT_msn_DOT_com> 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.
>
[quoted text clipped - 14 lines]
> Greg Collins [Microsoft MVP]
> Visit Braintrove (http://www.braintrove.com)

4. Allow user to editing of the data in the web page.
Here i think we can use javascript DOM to modify xml document
according to user's edit.
5. Get the updated data from the control(s) as XML
And now we can get the xml document of step 4.
6. Post it back to the SQL XML column.
:) here have nothing to consider.

Hope this can help.
Petar Atanasov - 23 May 2007 15:04 GMT
> 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.
>
[quoted text clipped - 10 lines]
>
> 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
TheSQLGuru - 23 May 2007 18:53 GMT
Use a table for the values on the form instead of XML?  :-))

Signature

TheSQLGuru
President
Indicium Resources, Inc.

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?

Signature

Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )

KJ - 26 May 2007 04:22 GMT
What about using the WriteXml method of the DataSet after the changes are
made to it? Does that do anything useful?

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?

Signature

Greg Collins [Microsoft MVP]
Visit Braintrove ( http://www.braintrove.com )


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.