472,958 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 1975
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.