473,883 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

very slow when updating dataset using AcceptChanges

does anyone experienced slowness when updating a dataset using

when calling this code it takes many seconds to update the database

SqlDataAdapter1 .Update(DsStude ntCourse1)
DsStudentCourse 1.AcceptChanges ()

i'm also wondering because w/ out AcceptChanges the data is still save
into the database and it is now faster.

thanks in advance for any info.
Nov 20 '05
10 5699

This is one from the test I did, I also did it with SetDatabinding (when you
want that, it was even smaller, reply than) the result was almost the same
however more difficult to explain.

You see in this sample not the acceptchanges however when that is done with
everything enabled the rows are as well presented in the way as what it in
my opinion should be.

Maybe you find why this behaviour is, I could not find one "logical" clue.

It needs only a form with a datagrid and this in the loadform event. After
that you have to delete the two ' , to show what I mean.

Dim ds As New DataSet
Dim dt As New DataTable("Bill ")
ds.Tables.Add(d t)
dt.Columns.Add( "Ryan")
For i As Integer = i To 3
dt.Rows.Add(dt. NewRow)
dt.Rows.Item(i) (0) = i.ToString
'DataGrid1.Data Source = dt
'with above endabled the datagrid shows 0 1 2 3 4
'DataGrid1.Data Source = Nothing
'now with these two rows disabled it displays 0 1 4 2 3
Dim dr As DataRow = dt.NewRow
dr(0) = "4"
dt.Rows.InsertA t(dr, 2)
DataGrid1.DataS ource = dt
Nov 20 '05 #11

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

Similar topics

by: Bill Salling | last post by:
am trying to updated the source data(Access2000) for my data grid. But keep getting this error An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dl Additional information: Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information I can get the error message to disapper by using the AcceptChanges action to the dataset, but...
by: Steve Amey | last post by:
Hi all I have a form with some data bound to it. There is a list on the form that could display any number of records that the user requests. When changes are made to the data I use the GetChanges method to get a temporary DataSet to pass the the Business Object layer, then when the updates have been applied to the database I Merge and then AcceptChanges on the main DataSet.
by: foobar | last post by:
Okay, I have created a Customers class. This class allows a user to select and update the customers table on an Sql Server database. I can retrieve the datatable generated by the class. Make changes to the table. Pass the table back to the class and update the backend with no problem However, here is my problem: After writing the table to xml using ds.writexml("path") and editing the document i then read the data into a dataset and...
by: tomp | last post by:
Hi, I am trying to insert a row into the Categories Table in Nothwinds database in MSDE. I am able to manually insert it using a query tool. Using the Debugger, it appears the DataSet loads correctly, the Data Row is populated correctly, and the new row is added to the DataSet. But the database is not updated. What am I missing?
by: Kai Thorsrud | last post by:
Hi, I've only got a typical crappy Microsoft book about ADO.NET (MSPRESS !"(¤#&/()&¤# you for mixing manual written code and suddenly adding designtime controls and wizards for updating data) I've got a function that is just for learning purposes the naming convention is bad and such since it's a mix of my conventions and MS Press conventions. I work with XML files in a database guy's approach. I've managed to create a schema for my...
by: Lars Netzel | last post by:
A little background: I use three Datagrids that are in a child parent relation. I Use Negative Autoincrement on the the DataTables and that's workning nice. My problem is when I Update these grid and write to the database and I set the new Primary Keys and related Fields to the new asigned atuonumbers in the Access.
by: Niels Jensen | last post by:
I have a some code which imports information from a text file to a dataset. Depending op what is being extracted from the text file, the dataset has 5 tables which can be written to. During this accessing I have to delete some records depending on certain criteria. I initially had some errors because I wasn't accepting the changes made to the dataset. So using .acceptchanges fixed the issue. however later on in the program a user may...
by: mike11d11 | last post by:
I'm trying to create an application that will have multiple users working off a table on a SQL server. Since multi users will be updating different records at any given moment, how can i get those changes and merge them into my current Dataset. I've been playing around with the GetChanges method and Acceptchanges but they just dont seem to be pulling over the changes and updating my Dataset. Maybe if someone could give me a sample of...
by: jonbartlam | last post by:
Hi There I'm not sure what exactly is going wrong here. I'm writing an application that retreives a table from a database (tbl_internalfaults) and updates it. (Actually, just the status column will need updating with 'CLOSED' where necessary.) I have been trying to use the OLEDB command builder to build the statement to update the database however it is returning an error whenever I try to do this. I already have a dataset full of data, 1...
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...
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...
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...
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,...
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...
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...
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...
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
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.