Solved

how to make work a distinct in vb.net

Posted on 2014-04-23
4
367 Views
Last Modified: 2014-05-07
hi all
how can i make work this


       Visitante.Text = ""
        Dim sqlmatriz2 As String = "select distinct nombre from contactos where nombre like '%" & Visitante.Text & "%' order by nombre  "
        Dim trasn2 As New SqlDataAdapter(sqlmatriz2, conn)
        Dim dtrans2 As New DataSet
        trasn2.Fill(dtrans2, "contactos")

is not doing the like is in a combobox sugest append configured
tsm
0
Comment
Question by:edo60
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 40019042
I don't understand what you want.

Your query should return all distinct Nombre because the Where clause is not filtering anything out
0
 
LVL 11

Accepted Solution

by:
John_Vidmar earned 500 total points
ID: 40019064
Your first line clears the value contained in Visitante.Text, so your final query is as follows (which returns all data from contactos):
select distinct nombre from contactos where nombre like '%%' order by nombre

Open in new window

0
 

Author Comment

by:edo60
ID: 40020861
oh man so confuse, how is to be?
tsm
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 40021448
So are we? Can you show us data for what you are trying to achieve?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question