How to remove rows from a DataTable without deleting form the database
- From: Susan Mackay <mackay_d@xxxxxxxxxxx>
- Date: Tue, 12 Sep 2006 08:57:57 +1000
I have a data table that is connected to a database table with a data
adapter in the 'standard' manner.
However I want to be able to remove selected rows from the data table (i.e.
no longer include them in the set that is displayed to the user) but I don't
want to delete the corresponding row from the database.
I've tried using the .Rows.Remove() method but an exception is thrown to say
I don't have a 'delete' command in the data adapter (which I don't of
course).
Because of the way the 'user interface' works, I can't build up an SQL
string that represents the current set of records (the user can "add to" and
"remove from" the current set of records - there is no underlying SQL
statement that represents the totality of the users additions and removals)
so I can't just clear the table and re-fill it.
Is there a way to do this?
Thanks
Susan
.
- Follow-Ups:
- Re: How to remove rows from a DataTable without deleting form the database
- From: Cor Ligthert [MVP]
- Re: How to remove rows from a DataTable without deleting form the database
- Prev by Date: how to connect to remote system from the local system
- Next by Date: Re: how to connect to remote system from the local system
- Previous by thread: how to connect to remote system from the local system
- Next by thread: Re: How to remove rows from a DataTable without deleting form the database
- Index(es):
Relevant Pages
|