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

e.action on rowchanged event not agreeing with dataTable.select(dataviewRowState.added)


I am trapping the rowchanged event on a table. I have the following code:

If e.Action = DataRowAction.Add Then

ds.Merge(CType(sender, DataTable).Select("", "",
System.Data.DataViewRowState.Added))
The funny thing is - the merge operation captures No rows.

This appears to be a big contradiction........

Any idea why this is happening?
Nov 23 '05 #1
1 1723
I've googled this some more and discovered it is a bug in .net 1.1 (fixed in
2.0)

I've tried a work-around to force the insert (listed on a google post):

ds.Tables(e.Row.Table.TableName).Rows.Add(e.Row.It emArray)

But this yeilds 0 rows in the ds.

If i look at the e.row.itemArray in the command window - I get a row
populated with expected values:

? e.Row.ItemArray
{Length=3}
(0): {System.Guid}
(1): {System.Guid}
(2): #1/1/2006#

But when I run the code to add the row to the DS in the immediate window I
get the following:

ds.Tables(e.Row.Table.TableName).Rows.Add(e.Row.It emArray)
Referenced object has a value of 'Nothing'.

Please note that the 'ds' is declared as follows: "Dim ds as new dataset"

Is there a solution to this? Do I build a custom datarow by hand and pass
it to my ds? Does everybody just avoid using the rowchanged event for
updating the backend in ADO.NET 1.1 ?.........????

stro" <as***@mnrr.com> wrote in message
news:gA*****************@tornado.rdc-kc.rr.com...

I am trapping the rowchanged event on a table. I have the following code:

If e.Action = DataRowAction.Add Then

ds.Merge(CType(sender, DataTable).Select("", "",
System.Data.DataViewRowState.Added))
The funny thing is - the merge operation captures No rows.

This appears to be a big contradiction........

Any idea why this is happening?

Nov 23 '05 #2

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

Similar topics

0
by: ZAky | last post by:
In Rowchanged event handler the datasource table do not contain the new row added. The DataRowChangeEventArgs contain information about the new row. So, if i try to use...
0
by: -Karl | last post by:
Ok.. I am totally stumped on this one. My site was workign great for awhile until I needed to have a Page_load event added to it. I added it and saw that it wasn't working. After ripping apart...
5
by: CJ Taylor | last post by:
Hey all, This is probably a dumb question, but still feeling a little strange from Labor day festiviities. Anyways, I want a shared sub, at least something that is easy to call from any one...
8
by: Aaron Smith | last post by:
If I add a handler to the row changed event of a datatable, it fires when a row has been added, but when in the event, it hasn't actually added the row yet... Is there a way around this? How can I...
4
by: astro | last post by:
I would like to build some generic code that is able to figure out the correct dataAdapter to apply changes to given a form with several dataAdapters. Any suggestions on the following? Thank...
0
by: Hank | last post by:
Hi experts: I have a setup project which needs to run a batch file after installation. I have a normal custom action added into to the install. How do I get this batch file executed after...
4
by: jones.jeremyp | last post by:
Ok, I am building a control, and it is a Calendar and a previous and next month buttons. The Calendar is build completely by hand. Now, it is using various properties such as Month, Day, Year to...
6
by: ronchese | last post by:
Hi. I'm trying to make a criteria string to use in Select() method of a datatable, searching for a date, but it is apparently not working! In one of my tests, I have a datatable with 1 row and...
13
by: pittsim | last post by:
Hi, I need to find a way to update some 400,000 rows of an in-memory datatable. Looping through rows is very slow. here's the code I'm using: protected virtual void SetEditStamps(ref DataSet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.