Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2006, 07:21 PM
ck ck is offline
Authorized User
 
Join Date: Dec 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent ! Please Help...

hi, i am a beginner, do anyone how to store data into XML database using MS Visual C#.NET ??? example of my XML:

<Enrolment>
       <Name></Name>
       <Gender></Gender>
</Enrolment>

in my web interface, i got a button called "save", a textbox called "txtName", & a dropdownlist/combo box called "cboGender". so, after i enter (data) in all fields that i mentioned above(txtName, cboGender), then click the "save" button, it will store/save all the data that i enter into the XML database. in this program, it can't allow to use SQL connnection. i hope any expert can help me on this. below is my c# code:

private void cmdSave_Click(object sender, System.EventArgs e)
{
DataSet ds = new DataSet();
string filepath = @"C:\Documents and Settings\All
                     Users\Documents\Database.xml";
FileStream findata = new FileStream
                    (filepath,FileMode.OpenOrCreate,FileAccess.Write,
                     FileShare.ReadWrite);
ds.Tables["Enrolment"].Columns["FirstName"] = txtfname.Text;
ds.WriteXml(findata);
findata.Close();
}
P/s: i also dunno how to get the dropdownlist/combo box data & save it into XML database, because textbox property is .text, but combo box there are no .text.

i will appreciate if someone can help me....thanks a lot...

regards,


ck.
__________________
ck.
 
Old May 17th, 2006, 06:17 AM
Registered User
 
Join Date: May 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SYEDHANIF Send a message via Yahoo to SYEDHANIF
Default

hi

i am not a expert in c#.net looking at this website may be your solutions is available

http://www.topxml.com/php_simplexml/...te_xml_doc.asp



SH SYED HANIF





Similar Threads
Thread Thread Starter Forum Replies Last Post
urgent deb_kareng ASP.NET 2.0 Professional 1 August 13th, 2007 07:29 AM
it's urgent deb_kareng ASP.NET 2.0 Professional 3 August 7th, 2007 07:40 AM
urgent help yash_coolbuddy_forindia BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 1 May 7th, 2007 08:40 AM
urgent???????????? nsr35 Beginning VB 6 1 October 3rd, 2005 10:57 AM
urgent ??????????????? nsr35 Pro VB Databases 0 October 3rd, 2005 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.