473,383 Members | 1,958 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,383 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 933

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?

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.