Click here to Skip to main content
15,935,728 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I wanted to ask you for your assistance. I have an SQL2008 database within which there is a table "tblA" with two columns. One is "PID" (for PrID)and the other is "XMlCol", in which XML document is saved. I wanted each row with the XML info, to parsed to a datagrid, and when i click each PID, a subform will display the relative XML attached to a datagrid. Can you guys please say something in VB.Net how this can be accomplished. I pray for your urgent reply...thank you guys.

You can read the XML as a string from your DB, then you can parse it in code to turn it in to the data you need.
Share this answer
Member 3274870 21-Jul-12 6:10am    
Thx christian, but can you give me a simple example on how to do it?
Christian Graus 21-Jul-12 6:22am    
If you don't know how to parse XML, why are you working with it ? You can use LINQ to XML, or the XmlDocument class and XPath, whichever you prefer. There's no way to create a 'simple example' without doing a lot of typing and generating something that you can't copy and paste and is probably less detailed than an article on the web.
Member 3274870 21-Jul-12 6:28am    
Thx Christian, infact i just figured it out and am currently compiling. I guess i was totaly blacked out. You really did help.Thankyou anyway.
hi guys, this was my first encounter with XML into a database row and i had a long trials figuring out how it can be handled. With Christian's help i managed to use strings and populate a grid. In addition to his help i found this great article, and it really really really helped. I guess it will help other too. The Article is written by Venu Gopal,( thank you Christian and CodeProject as well.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900