473,569 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataSet.Delete does not change number of rows

Hi,
I have a DataSet with 4 rows. I use .Delete command to delete a row
from it. I use .Count to get the number of remaining rows - still get
4, and if I try to access the rows, I get a
'DeletedRowInac cesibleExceptio n' on it. Has anyone seen this kind of
behaviour?
Thanks a lot in advance
DG

Oct 29 '07 #1
2 2423
I have a DataSet with 4 rows. I use .Delete command to delete a row
from it. I use .Count to get the number of remaining rows - still get
4, and if I try to access the rows, I get a
'DeletedRowInac cesibleExceptio n' on it. Has anyone seen this kind of
behaviour?
Thanks a lot in advance
Read the docs for "DataRow.Delete ()". Review "AcceptChanges( )" and
"RowState" in particular.
Oct 29 '07 #2
On Oct 29, 9:33 am, "Larry Smith" <no_spam@_nospa m.comwrote:
I have a DataSet with 4 rows. I use .Delete command to delete a row
from it. I use .Count to get the number of remaining rows - still get
4, and if I try to access the rows, I get a
'DeletedRowInac cesibleExceptio n' on it. Has anyone seen this kind of
behaviour?
Thanks a lot in advance

Read the docs for "DataRow.Delete ()". Review "AcceptChanges( )" and
"RowState" in particular.
Thanks for your input. I had tried that, but I was getting worse
discrepancies with that. As in , in terms of dataset size...my table
was not getting saved accurately...

Oct 29 '07 #3

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

Similar topics

16
3856
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but...
0
3481
by: Dave | last post by:
Tried posting in the Winform Forum without much luck, so posting here... After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the full code for the test below. Create a project drop in the code and...
4
2548
by: John Rose | last post by:
I have one databound TextBox on a page with one button. The TextBox loads the correct SQL record data but typing a new string into the Textbox fails to change the DataSet. Any ideas? There must be some way to force the edited TextBox to update the DataSet since it appears to not be done automatically. ...
2
1241
by: Darren Clark | last post by:
I have a data set... in which i need to remove 1 row based on a particaly name eg i have a data set (data) and it has 1 table and N rows.... It has a column name of i want to remove all records where the = 'any' ? how syntacically can i do that?
2
929
by: Sam | last post by:
Hi ther First off, sorry for this long post, but I think it is needed to explain my proble I have this dataset I am working with named dsMyDataset I am trying to add data to the dataset/ access database in the following manner Dim arMyLines As DataRow = dsMyDataset.MyRecords.NewRo odcMyConnection.Open( Dim holdNumber As Intege
4
3742
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure and username, password etc will be exactly the same for each server, the only thing that will change is the server name. Idealy I would like to get...
7
3352
by: Jean Christophe Avard | last post by:
Hi! I have a dataset that retreive all the item information from the database. I need to be able to edit them, in the dataset and in the database. I have this code, could anyone tell me if I'm in the good way, cause I build that code from a book example, but nothing works. I HAVE THIS CODE TO SAVE THE CHANGE OF THE DATASET ...
4
2236
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the person with Pocket PC. 3. XML file is used to populate DataSet on the Pocket PC. 4. User adds new rows, changes values, deletes some rows. 5. Altered...
0
1265
by: Patrick | last post by:
Hello, I want to modify an existing XML-File based on Input in a Form. I used a DataSet to load the XML File with the ReadXml method. I then displayed the relevant entries via the GetChildRows method. I now want to change/add/delete those ChildRows: How can I accomplish this?
0
7615
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...
0
7924
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. ...
0
8130
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...
1
7677
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...
0
6284
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...
1
5514
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...
0
3653
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...
1
2115
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
1
1223
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.