By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

help determining database row id

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

Take a look at the Dataview's find method.

http://msdn.microsoft.com/library/de...sFindTopic.asp

Example program
http://www.onteorasoftware.com/Downl...taviewfind.zip
Ken
----------------------------
"Craig" <cr***********@yahoo.com> wrote in message
news:da**************************@posting.google.c om...
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
Nov 21 '05 #2

P: n/a
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
Nov 21 '05 #3

P: n/a
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.