Obtain row number (not primary key)

base836ball

Active member
Joined
May 4, 2005
Messages
31
Programming Experience
1-3
How do I get the row number like if I have 5 records

1 John
2 Jacob
3 Angela
4 Holly
5 Matt

if Angela is called how do I get the row number of 3. Now 3 is not my primary key, just the row number. How would I go about coding this. I am using a data adapter, dataset, and a data reader.

Thanks
 
Solved (In a Way)

Nevermind I figured it out. For future reference what I did was a loop

Dim i as Integer = 0
drVedor = DataSet.Table(i)
Do Until drVendor.ID = txtId.Text
drVedor = DataSet.Table(i)
i = i =1
Loop

Since Id is my primary key and I have to have a primary key I just count by it.
If you have a better idea though, let me know
THanks Drew
 
Back
Top