473,320 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to get the index number of a row

i have the data row object & the data table object.
I want to determine what the index position of this datarow object is in the
containing table.

How can i determine this???

i.e,
using the row index number i can get hold of the row object
DIM oRow as DataRow = oDataTable.Rows(nIndex)

But can i work backwords,
using the oRow object, can i determine what nIdex is????

Nov 21 '05 #1
1 1383
If you are using a DataView, you may provide your dataview with a Sort key.
Then make use of the following code to locate your DataRow
Dim dv as DataView = DataTableName.DefaultView
dv.Sort = "KeyName"
Dim i as integer = dv.Find(KeyValue)

"Cordine" wrote:
i have the data row object & the data table object.
I want to determine what the index position of this datarow object is in the
containing table.

How can i determine this???

i.e,
using the row index number i can get hold of the row object
DIM oRow as DataRow = oDataTable.Rows(nIndex)

But can i work backwords,
using the oRow object, can i determine what nIdex is????

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bliss | last post by:
Hi All, I have a table Truck_Journey with the following structure Tj_Date Date Tj_Truck_Id Number(5) Tj_Truck_No Varchar2(10) Tj_Km Number(9) ....
0
by: Qiang Han | last post by:
Hi, Folks, I am really frustrated by a bug of function-based index. Is there anyone has any idea on this? Please drop some line, thanks first. DETAILS: I have a table called Point_tab. I...
25
by: sql_server_2000_user | last post by:
Hi, I have a table with about 305 million rows, and a composite primary key that consists of an ascending int and an ascending varchar(18), which is typically of length 13. Even if all the keys...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
2
by: deko | last post by:
Can I return the index number of an array if all I have is the element? For example, if I want to index the alphabet, I can put the letters in the array: Dim varLtr As Variant varLtr =...
29
by: shmartonak | last post by:
For maximum portability what should the type of an array index be? Can any integer type be used safely? Or should I only use an unsigned type? Or what? If I'm using pointers to access array...
12
by: bernhard.willems | last post by:
We are using DB2 UDB version 8.1 fp7 & fp9 on AIX 5.2. On our databases we do massive inserts and deletes (millions of rows). The performance is dramatically reduced because of pseudo deleted keys....
2
by: peter.prib | last post by:
Hi, I am having trouble getting DB2 to select an index I have created for a spatial location. Table definition create table gps_paf_address ( gnaf_address gnaf_address not null...
8
by: paii, Ron | last post by:
I have a table listing drawing numbers for jobs. It's primary key combines Job and numeric part of the drawing number. The structure allows the number part to repeat for each job. Job Dwg...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.