473,395 Members | 1,616 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,395 software developers and data experts.

Dataset/dataview update

Hi,

This is probably a very simple question, but it's held me up for the last
hour or two:

I have a simple xml document and schema - all I am doing for the moment is
loading the xml into a dataset built from the schema (primaryDriver1 in
code), which has an associated dataview.
A textbox (TextBox1) is bound to a field within the dataview:

private void Page_Load(object sender, System.EventArgs e)
{
dataView1.AllowEdit = true;
primaryDriver1.ReadXml("C:\\temp\\OriginalPerson.X ml");
TextBox1.DataBind();
}

The member is displaying correctly after loading the page.
On pressing a button, I just want to write a new Xml file showing any change
the user may have made to the bound textbox:

private void Button1_Click(object sender, System.EventArgs e)
{
if(primaryDriver1.HasChanges())
{
DataSet ds = primaryDriver1.GetChanges();
ds.WriteXml("C:\\temp\\NewPerson.Xml");
primaryDriver1.AcceptChanges();
}
}

...but it just doesn't work. Where's the glaring hole in my knowledge?

Thanks in advance,

Aid.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Jan 8 '06 #1
0 950

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

Similar topics

11
by: Nikki | last post by:
Is it possible to sort a dataset rather than a dataview? I have a web service that returns a dataset which I would like to sort before returning it (this is so the sorting is standardised and so...
7
by: skyjoker1 | last post by:
I think what I'm trying to do is something relatively simple. I have created a DataTable using the SQLDataAdapter.Fill method: Dim da As New SqlDataAdapter("SELECT * FROM Trans", cn) Dim ds As...
3
by: DraguVaso | last post by:
Hi, I have to update Some records in a DataSet, I now use this functions: Dim NewDataRow As DataRow 'dtsXmldFormSettings = the DataSet NewDataRow =...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
13
by: Lars Netzel | last post by:
hi! myDataSet that is fillled from an Access 2000 db and includes ONE table From that Table in myDataSet I create myDataView and use a Rowfilter to get a few rows that i work with (i need a...
3
by: Datatable Dataset Datagrid help | last post by:
Hi I am somewhat confused, I am new at VB.net I use XML data, I have a datagrid, I created a datatable so that I can create a custom format like true is this graphic false is this graphic and...
17
by: A_PK | last post by:
I have problem databinding the DataGrid with DataView/DataSet after the filter... I create the following proceudre in order for user to filter as many as they want, but the following code is only...
3
by: Newbie | last post by:
Could someone please tell me how or if the following is possible. I have created a small test database and have opened one connection, one DataAdapter, and one Dataset for it in my vb.net...
7
AHayes
by: AHayes | last post by:
I've been searching online for a while now with no luck, so I'll try the friendly folk here. _The Problem I have a dataset/dataview that's getting its data from an XML file (which we're using...
1
by: jc | last post by:
RE: Why use a CollectionBase class here vs dataset or dataview? I'm looking at some vb.net 2005 code that was generated from a homegrown Codesmith Template that generate all of the retreival and...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.