B
Bernie Yaeger
I picked up the thread of a different question in a different newsgroup, but
it belongs here:
having found the row where the 'addr' column begins with 'G', I want the
first one - not Gerber or Gorsky, but rather Gable. So I figured out how to
do this:
ods2.Tables(0).DefaultView.Sort = "addr"
For Each irow In ods2.Tables(0).Select("addr like '" & vartopassin & "%'")
MessageBox.Show(irow("addr"))
Exit For
Next
You can't do this with a computed column, at least I wasn't successful in
doing so, because then any 'G' is first found by, say, a dataview. But the
above works just fine.
Now 'Gable Street' is the result. But here's my question: having the
datarow I want, what is its index? You sometimes must have the index.
Please don't respond to tell me 'why do you need the index?' 'why not do
this or that?' I need the index. I can get an index in a dataview because
it returns an integer. But a datarow? How does one find the index of a
given datarow?
Any help would be appreciated.
Bernie Yaeger
it belongs here:
having found the row where the 'addr' column begins with 'G', I want the
first one - not Gerber or Gorsky, but rather Gable. So I figured out how to
do this:
ods2.Tables(0).DefaultView.Sort = "addr"
For Each irow In ods2.Tables(0).Select("addr like '" & vartopassin & "%'")
MessageBox.Show(irow("addr"))
Exit For
Next
You can't do this with a computed column, at least I wasn't successful in
doing so, because then any 'G' is first found by, say, a dataview. But the
above works just fine.
Now 'Gable Street' is the result. But here's my question: having the
datarow I want, what is its index? You sometimes must have the index.
Please don't respond to tell me 'why do you need the index?' 'why not do
this or that?' I need the index. I can get an index in a dataview because
it returns an integer. But a datarow? How does one find the index of a
given datarow?
Any help would be appreciated.
Bernie Yaeger