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

  • SEARCH
  • Home
  • 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 8875563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:00:20+00:00 2026-06-14T19:00:20+00:00

dasaset (ds) contain value like this comapring two dataset and write the phone number

  • 0

dasaset (ds) contain value like this comapring two dataset and write the phone number from dataset to notepad which is not equal to dataset1.but am getting the result in notepad like the phone numbers which are equal to both dataset

dataset
-------
91  9942321400
91  9865015695
91  9677031515
91  9994828285
91  9688104229

dataset1 values
----------------
91  9942321400
91  9865015695
91  9677031515

expected result in notepad
--------------------------
91  9994828285
91  9688104229

my code
-------
Dim i As Integer = 0
        Dim toggle As Boolean = False
        Do While (i <= ds1.Tables(0).Rows.Count - 1)
            Dim phone As String = ds1.Tables(0).Rows(i).Item(1).ToString
            Dim j As Integer = 0
            Do While (j <= Ds.Tables(0).Rows.Count - 1)
                Dim dumphone As String = Ds.Tables(0).Rows(j).Item(4).ToString
                If dumphone <> phone Then toggle = True 'This will set your flag to add the output.
                j = (j + 1)
            Loop
            'After we're done checking if there's a match, we decided to add it to the output.
            If toggle = True Then

                TextBox1.AppendText(a.ToString & "|" & b.ToString & "|" & c.ToString & "|" & d.ToString & "|" & phone.ToString & "|" & e1.ToString & "|" & f.ToString & "|" & g.ToString & "|" & h.ToString & "|" & i1.ToString & "|" & j1.ToString & "|" & k.ToString & "|" & l.ToString & "|" & m.ToString & "|" & n1.ToString & "|" & o.ToString & "|" & p.ToString & "|" & q.ToString & "|" & r.ToString & "|" & s.ToString & "|" & t.ToString & "|" & u.ToString & "|" & v.ToString & "|" & w.ToString & "|" & x.ToString)
                sw.WriteLine(TextBox1.Text)
                TextBox1.Text = ""
                toggle = False 'Reset the flag for the next value
            End If
            i = (i + 1) 'Move to the next value to check against.
        Loop



but am getting the output in note pad like this
------------------------------------------------
91  9942321400
91  9865015695
91  9677031515
  • 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-14T19:00:21+00:00Added an answer on June 14, 2026 at 7:00 pm

    I tried this way and I got the result you were looking for…

    For i As Integer = 0 To dataset.Tables(0).Rows.Count - 1
                Dim found As Boolean = False
                For j As Integer = 0 To dataset1.Tables(0).Rows.Count - 1
                    If dataset.Tables(0).Rows(i)(0).ToString = dataset1.Tables(0).Rows(j)    (0).ToString Then
                        found = True
                    End If
                Next
                If found = False Then
                    'here you are getting the right result in each loop
                    'in this example i'm showing the result in a textbox
                    'just change the instruction and write them in your note pad or wherever you want to
                    MsgBox(dataset.Tables(0).Rows(i)(0).ToString)
                End If
            Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

am having 2 dataset. named as ds, ds1. dataset value contain value like this
I want to filter values from a dataset . It contain phone numbers starting
I have code that looks like this: var ds = new DataSet(); var fooIDToFoo
I have a dataset which contains phone data for a given period, i need
I have two data sets, each dataset contains the pixel values of an image.
I've created a dataset which contains +/- 13000 rows with +/- 50 features. I
Dataset extends ArrayList. Dataset<Pair<SRGB>> data = new Dataset<Pair<SRGB>>(); Statement stmt = this.conn.createStatement(); ResultSet rs
[...] public DataSet ReturnPromoMagazinesDs() { MySql.Data.MySqlClient.MySqlConnection mysqlConnection = new MySql.Data.MySqlClient.MySqlConnection(this.connectionString); MySql.Data.MySqlClient.MySqlCommand mysqlCommand = new
I have a dataset that i am trying to set the default value as
I am trying to search a dataset for a value. If the dataset contains

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.