473,800 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dataset.ApplyCh anges() not taking effect.

Here is my code.

Does anyone know why when i reopen the table to view the data, none of the
rows have been written?

DownloadFileDat aSet.DownloadFi leRow MainTableRow =
(DownloadFileDa taSet.DownloadF ileRow)download FileDataSet.Dow nloadFile.NewRo w();
MainTableRow.Da te = DateTime.Now;
MainTableRow.Ro wID = gDownloadFileTa bleGUID;
MainTableRow.Fi leName = sFileName;
MainTableRow.UR L = sSource;
MainTableRow.Fi leSize = iFileLength.ToS tring();
downloadFileDat aSet.DownloadFi le.AddDownloadF ileRow(MainTabl eRow);

//Save the dataset to the database
downloadFileDat aSet.AcceptChan ges();
Jul 21 '08 #1
3 1943
* * * * * * //Save the dataset to the database
* * * * * * downloadFileDat aSet.AcceptChan ges();
IIRC AcceptChanges do not save the changes to the DB, only to the
dataset in memory
Jul 21 '08 #2
How do i save the changes to the DB?

"Ignacio Machin ( .NET/ C# MVP )" wrote:
>
//Save the dataset to the database
downloadFileDat aSet.AcceptChan ges();

IIRC AcceptChanges do not save the changes to the DB, only to the
dataset in memory
Jul 21 '08 #3
On Mon, 21 Jul 2008 13:28:16 -0700, greatbarrier86 wrote:
How do i save the changes to the DB?
I had exactly the same problem ended up with:

internal void UpdateDatabase( )
{
EndEditOnAllBin dingSources();

tableAdapterMan ager.UpdateAll( scoreDataset);

}
private void EndEditOnAllBin dingSources()
{
var BindingSourcesQ uery =
from Component bindingSources in
this.components .Components
where bindingSources is BindingSource
select bindingSources;

foreach (BindingSource bindingSource in BindingSourcesQ uery)
{
bindingSource.E ndEdit();
}
}

Jul 22 '08 #4

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

Similar topics

40
3255
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. However when you retrieve these values into a dataset and ToString() them
2
1676
by: Gopal | last post by:
Hi, I've a module report.py having a set of funtions to open/close/write data to a log file. I invoke these functions from another module script.py. Whenever I'm changing something in report.py, I'm running the file (however, it has not effect). After that I'm running script.py again. However, the output is not taking effect.
1
2003
by: John | last post by:
Hi All, When I delete the last record from my dataset and then WriteXML() to the file; the Table itself, in the xml file, is removed. I need to prevent the table structure from being deleted if there are no more records to be written to the XML file from the Dataset. Any ideas here, John.
35
2134
by: MuZZy | last post by:
Hi All, I got a issue here and hope someone can help me: Let's consider this code: // =================== CODE START ================================= using System; using System.Data; namespace TestNamespace {
2
2372
by: Chris | last post by:
Hi, I have a desktop app written in vb.net. It takes a wile to load from sql server via a stored proc. Is there a way I can cache the dataset so that If i reopen the the program it loads faster. The data in the database doesn't change that often. Where can I find info on this? Thanks
22
25607
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
3
3119
by: Imran Aziz | last post by:
Hello All, I have a dataset that I populate using a SQL Server database, and the second one that I populate using a mySQL Server database, I need to combine the results in memory and then sort them, how do I go about doing that ? This is a search query, so I do not want to create another temp table to do this, any idea's please. Imran.
1
2830
by: None | last post by:
Hi, I have developed webshop application using asp.net 1.1. I'm using DataGrid in one of the pages of my site. During the page load the DataGrid will be binded by around 7500 products(rows). At the same time i'm storing the DataSet object in the Session Variable for later refinement. I'm using StateServer mode for storeing the session values. But in my server the W3wp.exe is taking 90 - 100 % CPU
3
3431
by: tshad | last post by:
Using asp.net 2.0, I am finding that at times, the old javascript will still be there. I was working with it for a couple of hours and the changes seem to happen. But at the end of the day, I found that my last changes weren't taking affect. I was trying to delete my "alerts" before doing a final build but even after taking out all my alerts, when I built it and ran it - the alerts were still
0
9690
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
10275
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
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...
0
6811
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
5471
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...
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.