473,654 Members | 3,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

datarow not updating...

using the following code, I've been unable to write an updated xml
document.I can see the xml
file get refreshed but even at that, it writes in the original contents.
these procs come from a
databaseengine class i created, theDataStore is a dataset that gets loaded
from a xml data file
when the constructor runs.

the database engine sits in a application variable within a IIS application
and only one copy ever
exist in memory. updateUser is called via delegate.

the dataset in memory, and thus the xml file that gets written dont seem to
get updated.

public void updateUser (zDatabaseObjec t theObject)
{
zUser theUser = (zUser) theObject;

DataRow theRow;
theRow = theDataStore.Ta bles["tblUsers"].Rows.Find(theU ser.UserID);

theRow["FullName"] = theUser.FullNam e;
theRow["UserName"] = theUser.UserNam e;
theRow["Password"] = theUser.Passwor d;
theRow["Email"] = theUser.Email;
theRow.AcceptCh anges();

saveDataStore() ;
}

private void saveDataStore()
{
theDataStore.Ac ceptChanges();
theDataStore.Wr iteXml(theRootD irectory + "zDatabase.xml" );
}
Nov 18 '05 #1
0 934

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

Similar topics

3
1753
by: spammy | last post by:
hi all, my code currently reads as the following: ////// double tmpposition = (double)dr + pos; dr = tmpposition;
3
21366
by: Jon S via DotNetMonster.com | last post by:
Hi all, I'm having a problem updating a simple change I've made to a Access 2000 table through databinding. The error I get is : An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll Additional information: Update requires a valid InsertCommand when passed DataRow collection with new rows.
0
1389
by: Doug | last post by:
I've got a strongly-typed dataset with 2 related tables in it ("Staff" and "Roles"). I want to make a change to the parent Staff row and also to its child Role row. I'm having difficulty figuring out the best way to do this. First question: I can get myself a new instance of a row and make changes to it, but presumably that's then a separate object from the original dataset row. How do I reconcile my changes back to the dataset?
6
2803
by: BB | last post by:
Hello all, I am using the currency manager in VB to navigate a dataset. I know how to use .position to loop through the rows, but what I want to do is *get* the position of the row I just added/updated, so that I can reposition the currency manager there sometime later. Seems like after I add a detached datarow to the datatable, that index should be sitting there somewhere
2
1581
by: Steve Amey | last post by:
Hi all I am binding a DataRow to some controls on a form. When I've finished editing the DataRow I click on a toolbar button to save the changes. If the focus is on a particular control, the item in the DataRow does not update to be the value of the control, for example, if I have a TextBox called txtEntry which is bound to the Entry column of the DataRow, if the focus remains on the TextBox while I click on the save button the...
0
1441
by: Job Lot | last post by:
I have designed a user interface with controls bound to data using Data Source Window. Draging and dropped customer table from Data Source Window created various navigation controls and a DataGridView control. I am storing cusotmer information along with their image in customer table. I have a separate form for editing new customer information and inline editing to datagrid is not required. For this purpose I am passing selected row...
2
1988
by: rn5a | last post by:
When a DataGrid is in the editable mode, users can change the quantity of the items that are currently in his shopping cart by entering a new quantity in a TextBox. After changing the quantity, a column named *Quantity* in a database table also gets updated with the changes made by the user. The Form has a Label as well which shows the total cost of all the items that are currently present in his cart. This the OnUpdateCommand event...
6
30015
by: Manikandan | last post by:
Hi, I need to insert the datetime with milliseconds value into a datarow. My code as below DataTable testDataTable=new DataTable(); testDataTable.Columns.Add("updatedDateTime", typeof(DateTime)); DataRow testDateRow=surveyUpdatedDateDataTable.NewRow();
0
2312
by: Infog | last post by:
What is the difference between these two? If I use one or the other when adding or updating a strongly typed DataTable's DataRow, will there be any difference in the result? I can't find an explanation in any MSDN page. _row.SetField("FieldName", "A value") _row("FieldName") = "A value"
0
8379
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8294
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7309
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.