473,324 Members | 2,179 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,324 software developers and data experts.

Distinguish 2 situations when a DataRow in Detached state; Or why not make the data row intact after being added then removed from a dataRow collection?

Hi,

I notice a DataRow in Detached when it is just created by
dataTable.NewRow(), and when added to a dataTalbe's row collection, then
removed from that collection.

For the first situation, I can still read or set data row's item value, but
after it is removed from data table collection, it can not longer read its
data. I will get a RowNotInTableException.

Is there a way to distinguish these two situation? Why doesn't Microsoft
introduce another state? Or why not make the data row intact after being
added then removed from a dataRow collection?

Thanks,
Ryan

Jun 7 '06 #1
0 1250

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

Similar topics

3
by: Shravan | last post by:
Hi, How can I bind DataRow array to ComboBox. I tried setting DataSource -> DataRow Array DisplayMember -> ColumnName But it was showing "System.Data.DataRow" for every item in the...
5
by: jurson | last post by:
Hello, I remove row from DataTable. It works ok, the row is removed from collection. It should be marked as 'detached'. Am I right? Then I try to retrieve 'detached' rows using the code shown...
3
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...
6
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...
0
by: Ryan Liu | last post by:
Hi, I notice a DataRow in Detached when it is just created by dataTable.NewRow(), and when added to a dataTalbe's row collection, then removed from that collection. For the first situation, I...
1
by: Ryan Liu | last post by:
Hi, Is that safe to say a Detached DataRow neve in a DataTable's Rows collectoin? But in my log file, I do see a Detached row: foreach(DataRow dr in this.currentQuotaUserDt.Rows) {
1
by: Arpan | last post by:
This is how I am dynamically adding a table to a DataSet: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) 'Create an empty DataSet Dim dSet As New DataSet ...
2
by: cjard | last post by:
Suppose: A TextBox is bound to a BindingSource, which is bound to a DataTable A BindingNavigator is used to alter the current row being looked at by the BindingSource (i.e. Nav's NEXT button is...
8
by: jehugaleahsa | last post by:
Hello: We wrote an entire application where we add our DataRows to our DataTables immediately. However, we have to shut off our constraints to do this. We would like to use detached DataRows to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.