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 7883255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:29:05+00:00 2026-06-03T04:29:05+00:00

Dim keywords() As String = {FirstName, LastName, Gender} I have a datatable with just

  • 0

Dim keywords() As String = {“FirstName”, “LastName”, “Gender”}

I have a datatable with just 1 column. I want to check if all the rows in the datatable contain all of the keywords, For example,

    Table1
    __________
    FirstName
    LastName
    Gender

This table1 is valid.

    Table2
     ______
     FirstName
     Gender

This table2 is not valid coz LastName is missing

     Table3
      ______
      FirstName
      LastName
      Gender
      DateofBirth

This table3 is also valid coz it contains all the neccessary thing in the keyword. How can I do that ? Is it also possible to point out which is missing ? for example, in table2, LastName is missing.

Value added help would be .. check for duplicate as well .. but this is not essential .. if i can work out the first problem .. i am so grateful already ..

Thanks a lot ….

  • 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-03T04:29:07+00:00Added an answer on June 3, 2026 at 4:29 am

    Simply rotate a loop to DataTable rows

    DataTable table = new DataTable();
    // TODO: Render table
    
    string[] keywords = { "FirstName", "LastName", "Gender" };
    bool isValid = true;
    bool hasDuplicates = false;
    foreach (string keyword in keywords)
    {
        DataRow[] rows = table.Select("Field='" + keyword + "'");
        if (rows.Count() <= 0)
        {
            isValid = false;
            break;
        }
        if (rows.Count() > 1)
        {
            hasDuplicates = true;
            break;
        }
    }
    
    if (!isValid)
    {
        //TODO:
    }
    if (hasDuplicates)
    {
        //TODO:
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

dim dataType as String toolTip=Marks And Number[String] I want to get the [String] alone.
Dim CustID As String = txtSrchCustID.Text Dim FirstName As String = txtNewCustFName.Text Dim SecondName
Dim insert_coupon_query As String = (INSERT INTO qa_discountcoupons (id, status_code) VALUES (AUTO_INCREMENT_ID, 5)) Dim
Consider: Dim line As String Using readFile As New StreamReader(SalesUpdateFile) While (line = readFile.ReadLine)
I have a sub-procedure which I want to run a different process, depending on
Question: Hello All, Sorry that this is kind of a noob question. I just
I have a CSV that starts with 3 columns. A cumulative percentage column of
I have encountered a problem where in my database I have a column that
Dim strTest(recordSet.Count)() As String While index < recordSet.Count strTest(index)(recordset.item(index).getvalue(0).tostring, recordset.item(index).getvalue(0).tostring, recordset.item(index).getvalue(0).tostring) index +=1 End
i am trying to run the following statement in excel: Dim myquery As String

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.