|
-
Dec 4th, 2007, 11:31 PM
#1
Thread Starter
Member
[2005] row's index +mysql
Public Function get_row_index(ByVal field_item As String, ByVal tbl_name As String, ByVal fieldname As String) As Integer
ds.Tables(tbl_name).PrimaryKey = New DataColumn() {ds.Tables(tbl_name).Columns(fieldname)}
Dim foundrow As DataRow
foundrow = ds.Tables(tbl_name).Rows.Find(field_item)
For i As Integer = 0 To ds.Tables(tbl_name).Rows.Count - 1
If ds.Tables(tbl_name).Rows(i).Equals(foundrow) Then
get_row_index = i
Exit For
End If
Next
end function
I need to get the index of the field_item. Is it the right way?
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
|