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

What's Better? Adding Incomplete DataRows or Leaving Detached

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 circumvent this.

What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?

Thanks for any input!
~Travis
Aug 25 '08 #1
8 1996
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.

What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?

Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.

Can you provide more detail?
Aug 25 '08 #2
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis

Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.

Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.

I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.

Plain curiousity on how to do it.

Thanks,
Travis
Aug 25 '08 #3
I have used DataRowVersion to find changes to rows in a DataTable.

-rusty
On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:


On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this..
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?

Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.

I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.

Plain curiousity on how to do it.

Thanks,
Travis- Hide quoted text -

- Show quoted text -
Aug 25 '08 #4
On Aug 25, 4:06*pm, rusty.lee.2...@gmail.com wrote:
I have used DataRowVersion to find changes to rows in a DataTable.

-rusty

On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.
I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.
Plain curiousity on how to do it.
Thanks,
Travis- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
Awesome. That is what I wanted to know!
Aug 26 '08 #5
On Aug 25, 4:06*pm, rusty.lee.2...@gmail.com wrote:
I have used DataRowVersion to find changes to rows in a DataTable.

-rusty

On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.
I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.
Plain curiousity on how to do it.
Thanks,
Travis- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
How can I quickly iterate over detached rows and add them to my
DataTable?
Aug 26 '08 #6
On Aug 26, 8:01*am, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 4:06*pm, rusty.lee.2...@gmail.com wrote:


I have used DataRowVersion to find changes to rows in a DataTable.
-rusty
On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.
I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.
Plain curiousity on how to do it.
Thanks,
Travis- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -

How can I quickly iterate over detached rows and add them to my
DataTable?- Hide quoted text -

- Show quoted text -
I'm not sure I understand the question, but in general you add a
DataRow to a DataTable with DataTable.Rows.Add(DataRow) method. This
implies that the row can be added to the table. Basically the row you
are adding has to have identical columns as the DataTable, I think.

You would have to describe what it is you want to iterate through.
Are these datarows part of a collection or array?

-rusty

Aug 26 '08 #7
On Aug 26, 4:32*pm, rustylee <rusty.lee.2...@gmail.comwrote:
On Aug 26, 8:01*am, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:


On Aug 25, 4:06*pm, rusty.lee.2...@gmail.com wrote:
I have used DataRowVersion to find changes to rows in a DataTable.
-rusty
On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.
I want to know how they track DataRows that haven't been added to the
DataTable. If you don't store them somewhere, I don't know how to get
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.
Plain curiousity on how to do it.
Thanks,
Travis- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
How can I quickly iterate over detached rows and add them to my
DataTable?- Hide quoted text -
- Show quoted text -

I'm not sure I understand the question, but in general you add a
DataRow to a DataTable with DataTable.Rows.Add(DataRow) method. * This
implies that the row can be added to the table. *Basically the row you
are adding has to have identical columns as the DataTable, I think.

You would have to describe what it is you want to iterate through.
Are these datarows part of a collection or array?

-rusty- Hide quoted text -

- Show quoted text -
I suppose my original question was: How do the Windows Form controls
hold detached rows, such as the DataGridView. I realized after some
research that the BindingSource keeps track of a single detached row
automatically. When the next detached row is added, the current
detached row is added. If you use the controls, the detached rows are
tracked for you. Otherwise, you have to manage the detached rows
yourself. There is no way to query a DataTable for all of its detached
rows.
Aug 27 '08 #8
On Aug 27, 6:20*am, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 26, 4:32*pm, rustylee <rusty.lee.2...@gmail.comwrote:


On Aug 26, 8:01*am, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 4:06*pm, rusty.lee.2...@gmail.com wrote:
I have used DataRowVersion to find changes to rows in a DataTable.
-rusty
On Aug 25, 2:11*pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
On Aug 25, 2:40*pm, JDeats <Jeremy.De...@gmail.comwrote:
On Aug 25, 3:14 pm, "jehugalea...@gmail.com" <jehugalea...@gmail.com>
wrote:
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 circumvent this.
What do you normally do to track detached DataRows? Is there a way to
retrieve them? or do I have to stored them in some temporary location?
Thanks for any input!
~Travis
Let me make sure I understand: So you're using "detached" DataRows
stored in a collection of some sort outside your DataTable because if
you added them to your DataTable it would violate an existing
constraint and you want to know what the best way is to track deteched
DataRows in general. There's just not enough context to the question
to give a very useful answer, but I would imagine the worst solution
would be circumventing the restraints on your DataTable.
Can you provide more detail?
Well, no, I can't. My question is very open. I know people use
DataTables to track changes on their UIs.
I want to know how they track DataRows that haven't been added tothe
DataTable. If you don't store them somewhere, I don't know how toget
them back. I am curious whether people store them in a List<DataRow>
or if there is a more elegant solution.
Plain curiousity on how to do it.
Thanks,
Travis- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
How can I quickly iterate over detached rows and add them to my
DataTable?- Hide quoted text -
- Show quoted text -
I'm not sure I understand the question, but in general you add a
DataRow to a DataTable with DataTable.Rows.Add(DataRow) method. * This
implies that the row can be added to the table. *Basically the row you
are adding has to have identical columns as the DataTable, I think.
You would have to describe what it is you want to iterate through.
Are these datarows part of a collection or array?
-rusty- Hide quoted text -
- Show quoted text -

I suppose my original question was: How do the Windows Form controls
hold detached rows, such as the DataGridView. I realized after some
research that the BindingSource keeps track of a single detached row
automatically. When the next detached row is added, the current
detached row is added. If you use the controls, the detached rows are
tracked for you. Otherwise, you have to manage the detached rows
yourself. There is no way to query a DataTable for all of its detached
rows.- Hide quoted text -

- Show quoted text -
I see. I'm going to look into that (which rows were added). One
thing that you should be able to do is capture an event where a new
row is added and track that way.
-rusty
Aug 27 '08 #9

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
7
by: Michele Simionato | last post by:
So far, I have not installed Prothon, nor I have experience with Io, Self or other prototype-based languages. Still, from the discussion on the mailing list, I have got the strong impression that...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
51
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
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...
1
by: ad | last post by:
What is the difference between DataRow and DataRowView?
30
by: Alper AKCAYOZ | last post by:
Hello Esteemed Developers and Experts, I have been using Microsoft Visual C++ .NET for 1 year. During this time, I have searhed some topics over internets. Most of the topics about .NET is...
98
by: tjb | last post by:
I often see code like this: /// <summary> /// Removes a node. /// </summary> /// <param name="node">The node to remove.</param> public void RemoveNode(Node node) { <...> }
3
by: walex | last post by:
Hello guys, I'm trying to install devsec an application for ffpeg for camera,but on,is a c programme,after compilation ,i now type make, then this two error are generated.common.h:67: error: array...
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: 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
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.