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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:11:54+00:00 2026-06-13T16:11:54+00:00

This code tries to display in listview fields of databases, but when he tries

  • 0

This code tries to display in listview fields of databases, but when he tries to show the part of the search he repeats previous data

Dim ds As DataSet = New DataSet
Dim sqlcon As MySqlConnection
Dim da As MySqlDataAdapter
 If sqlcon.State = ConnectionState.Open Then
        MsgBox("connected")
        da = New MySqlDataAdapter("SELECT cod_funcionario, matricula, nome, cpf, rg, sexo, email, telefone, endereco, data_nasc, setor FROM funcionario", sqlcon)
        da.Fill(ds, "funcionario")
        Tabelas.Items.Clear()
        If ds.Tables("funcionario").Rows.Count > 0 Then
            For i As Integer = 0 To ds.Tables("funcionario").Rows.Count - 1
                With Tabelas.Items.Add(ds.Tables("funcionario").Rows(i).Item(0).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(1).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(2).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(3).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(4).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(5).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(6).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(7).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(8).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(9).ToString)
                    .SubItems.Add(ds.Tables("funcionario").Rows(i).Item(10).ToString)
                End With
            Next
        End If
    Else
  • 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-13T16:11:55+00:00Added an answer on June 13, 2026 at 4:11 pm

    The sql search doesn’t have a where clause, so it returns every row in funcionario. Is that your intention? Is the repeated data actually in the database?

    If the query is repeated in the same function, you might need a ds.clear before the second query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried this code but no data is lost from the listview when
Im trying to display this listview, but I keep getting a: 07-17 21:14:22.233: ERROR/AndroidRuntime(349):
I try to draw some lines with different colors. This code tries to draw
i have this hap code of which tries to selects sub-node from the main
I tries to delete an entity - table This is the code: db.Sessions.SqlQuery(delete table
i have tried this code to redirect a php page.but it s not working
i've tried using this code and this to make a random quote generator, but
I have a List of objects and a ListView where I display this list.
I currently have this XAML Code: <ListView x:Name=listFeedSearch Margin=-548.856,95.333,0,7.667 HorizontalAlignment=Left Width=542.5 RenderTransformOrigin=0.5,0.5 ItemsSource={Binding SearchCollection}>
I tried this code to open a file in Python: f = open("/Desktop/temp/myfile.txt","file1") It

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.