Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9134833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:43:59+00:00 2026-06-17T08:43:59+00:00

I am using the following query to pull a row from a datatable in

  • 0

I am using the following query to pull a row from a datatable in memory.

Dim results = _
   From myRow In exceldt.AsEnumerable() _
   Where myRow.Field(Of String)("Serial Number") = Row.Item("Serial Number") _
   Select myRow

resultrow = results.CopyToDataTable.Rows(0)

I need to get the index of the resultrow when it was part of exceldt. I can’t seem to find anything on this. Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:44:00+00:00Added an answer on June 17, 2026 at 8:44 am

    I don’t work in VB.net so forgive my code but you can get the index of a projection with something along the lines of this:

    Dim result = exceldt.AsEnumerable() .Select (Function(item, index) _
      New With { .Index = index, .SerialNumber = item }).ToList 
    

    I can’t provide much more with in VB but this quick example does work as a Console app. You can see how the select / projection captures the index and item. You will need to incorporate similar logic before filtering (where) you initial enumeration.

    Dim names = {"Andy", "Tom", "Fred", "Sally"}
    
    Dim results = names _
        .Select(Function(item, index) New With {.Index = index, .Name = item}) _
        .OrderBy(Function(item) item.Name)
    
    For Each item In results
        Console.WriteLine("{0} - {1}", item.Index, item.Name)
    Next
    

    results

    0 - Andy
    2 - Fred
    3 - Sally
    1 - Tom
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to pull information from a MySQL table using the following query: $skill
I'm using the following query to select users from my 'users' table with the
I am using the following query to select wait times from the table wait_times
I'm using the following query to extract the frequent short values from a mediumblob
i've been using the following query: select LEN(columnname) as columnmame from dbo.amu_datastaging This works,
I'm using the following query to perform a search in SQLite. public MatrixCursor listViewCursor(String
Using the WEBDav libraries from Troy Wolf I am using the following query to
I have this query that I'm using to pull records from my DB: SELECT
I'm trying to pull records in Hibernate using the following Criteria query. Security result
The following query works properly to pull company names from one table into jquery

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.