473,395 Members | 1,639 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,395 software developers and data experts.

RowState

Hello,

I have a Dataset in which i have multiple rows. Some of these rows
have been edited and some new rows have also been added to the
Dataset.

Now I have two Commands that is the InsertCommand and the
UpdateCommand.

I want to seperate the rows in such a way that, all the rows that have
been newly added should at once be sent to the InsertCommand and all
the rows that have been edited should be sent to the UpdateCommand.
Can someone pls tell me how to do this???

Jul 2 '07 #1
1 1542
Hi.

The standard way to do this is by using the SqlDataAdapter object. It
automatically does this for you when you call it's method Update(...).

Excellent tutorial can be found on
http://quickstart.developerfusion.co...ataFromDB.aspx

HTH :)

Bhagya je napisao/la:
Hello,

I have a Dataset in which i have multiple rows. Some of these rows
have been edited and some new rows have also been added to the
Dataset.

Now I have two Commands that is the InsertCommand and the
UpdateCommand.

I want to seperate the rows in such a way that, all the rows that have
been newly added should at once be sent to the InsertCommand and all
the rows that have been edited should be sent to the UpdateCommand.
Can someone pls tell me how to do this???
Jul 2 '07 #2

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

Similar topics

6
by: BStorm | last post by:
Is it possible to change individual RowState properties from updated to not updated?
4
by: Bill Todd | last post by:
Is there any way to display the RowState of each row in a computed column in the DataTable? -- Bill
2
by: Phil Townsend | last post by:
I have a datagrid in a windows forms application. The datagrid gets its data via a web service. Users can modify rows in the datagrid then post their changes. However, when changes are made the...
6
by: astro | last post by:
I'm working through the binder stuff trying to get a handle on it... I have setup a master-detail dataset and have a couple of textboxes from the master along with a datadgrid for the child data....
6
by: timbobd | last post by:
I have a Windows form that displays a database table in a DataGrid. When you click on a row, the row's values get copied to bound TextBoxes below, and when the "Save" button is clicked the database...
0
by: Jarod | last post by:
Hey I have GridViewEventArgs e. And this e.Row.RowState returns current state. I woudl like to check if e.Row.Rowstate == ...Edit; But the problem is sometimes Rowstate is something like this :...
0
by: vbie | last post by:
I have a function that evaluates whether the current rowstate of a datatable is ADDED. If RowState is Added then an INSERT sql command is executed; if not then an UPDATE sql command is performed. ...
13
by: Dale Harris | last post by:
I'm getting really strange behaviour where the data source RowState is not being updated to modified in some circumstances. I place my controls on a form, bind them through a BindingSource control...
3
by: perspolis | last post by:
Hi all I have a master detail table which I use them in Transaction to Update them. in some cases the detail table generates error and I Rollback transaction but RowState of master table dosen't...
2
by: Gurny | last post by:
I have a DataSet I am loading via the DataSet.Tables.Add() method. I call the AcceptChanges method on the DataTable first thing. Every thing looks good i.e. RowStates are all Unchanged. I then...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
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,...
0
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...
0
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,...
0
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...
0
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...

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.