help determining database row id

C

Craig

I know this is retarded but can you help: I'm using Visual Basic .net
and I'm trying to determine the row ID from a dataset find i.e.

Dim rowFoundRow As DataRow = DataSet11.Tables("Titles").Rows.Find(n)

the find returns successfully and if I browse the object in the
debuggger I can see the "rowid" and "oldrecord" and "newrecord" all
have pointers to the row's position, but as far as I can tell those
valuse are not accessable within my fuction. Am I missing somthing? Is
ther anothere way to get the data? I'm trying to use the rowid in the
following:

BindingContext(DataSet11, "titles").Position = ??? rowid ???

thanks for your help
craig
 
K

Ken Tucker [MVP]

Hi,

Take a look at the Dataview's find method.

http://msdn.microsoft.com/library/d...tml/frlrfSystemDataDataViewClassFindTopic.asp

Example program
http://www.onteorasoftware.com/Downloads/dataviewfind.zip


Ken
----------------------------
I know this is retarded but can you help: I'm using Visual Basic .net
and I'm trying to determine the row ID from a dataset find i.e.

Dim rowFoundRow As DataRow = DataSet11.Tables("Titles").Rows.Find(n)

the find returns successfully and if I browse the object in the
debuggger I can see the "rowid" and "oldrecord" and "newrecord" all
have pointers to the row's position, but as far as I can tell those
valuse are not accessable within my fuction. Am I missing somthing? Is
ther anothere way to get the data? I'm trying to use the rowid in the
following:

BindingContext(DataSet11, "titles").Position = ??? rowid ???

thanks for your help
craig
 
C

Cor Ligthert

Craig,

I never have seen a way to get a row index number in a datatable.

However when you find a row, you do nothing than find the reference to that
row in the datatable, so you have it already.

I hope this helps?

Cor
 
C

C Cantrell

Ken,
Thanks, almost there. The problem with dataview is that you have to sort
the field you want to search, and in this case the records I'm trying to
locate are unsorted, so the resulting index does not map the dataset
entry. Any way to do an unsorted dataview find? Also, are wildcards
accepted for partial matches?
Thanks again,
Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top