Subt:
The grid should show those values unless you are bound to a filtered
dataview, then any new rows that don't match the filter criteria will just
'disappear' Usually you can use Default Values for the dataColumns to get
around this.
As far as the update...they should be submitted and if they aren't, one of
two things is probably the problem 1) The rowstate isn't being marked as
Added/Modified/deleted 2) The update command isn't processing it correctly.
A lot of times, if you have a paramaterized where clause and there aren't
any matches, you may have an issue. Similarly, if your row state isn't
marked as one of the changed values, you can call update all year and
nothing will happen. Are you sure you aren't getting any exceptions on
Update?
Unless something is wrong, this shouldn't be happening and most things would
notify you of a problem unless their notifications are turned off or a try
catch isn't handling the exception and is masking the problem.
As far as the difference, they are effectively the same, but C# is case
sensitive and if you have a STD, you can create a new table in lowercase
letters that is totally different from one with upper case letters. It
looked like you were mixing the Strongly typed dataset references with a
weakly typed one, eliminating on of the major benefits of STD's, that's the
ohnly reason I mention it.
Cheers,
Bill
subt said:
william, thanks, it appears you are correct.
the code was adding new rows, however it was not displaying the new rows
correctly in the datagrid when filtering a dataview. what does not make
sense is that the DataAdapter also did not send those rows to the database
on Update even though the filter id problem depended on a non- primary key
column.
also, what is the difference in using dataset.Tables["tbl"] vs. dataset.tbl ??
thanks