|
-
Feb 9th, 2003, 08:53 AM
#1
Thread Starter
Addicted Member
delete rows by keys
does anybody have an idea how can i find a row in defailt view table by key value that i have ?????
-
Feb 9th, 2003, 11:11 AM
#2
Member
Re: delete rows by keys
Originally posted by ronlahav
does anybody have an idea how can i find a row in defailt view table by key value that i have ?????
dim MyRow as DataRow()=ds.Tables("MyTable").Select("ID = 5")
MyRow is an array of DataRows. Each row (element of the array) contains Item collection
MessageBox.Show(MyRow(0).Item("Name")
If you want to search by key based on several fields
Dim vals As String() = {"Value1", "Value2"}
Datatable1.PrimaryKey = New DataColumn() {.Columns("Column1"),
.Columns("Column2")}
dim dr as system.data.datarow = Datatable1.Rows.Find(vals)
-
Feb 10th, 2003, 03:20 AM
#3
Thread Starter
Addicted Member
find & delete row in datatable
thanks for helping me.
mabe i didnt clarify my self as well...
my question is not just how i find row in the dataset.
i have key which type is integer and i want to find a row in dataset table and then to delete it. when i find the row in the dataset i dont knoe how to delete it from the dataset????
pleeeeeesssssseeeee help me!!!!!!!!!!!!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|