Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Listing Database Info troubles

  1. #1
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47

    Question Listing Database Info troubles

    Im trying to display the info i have in a databse. For example when i retrieve data from a field called "Artist" and i get the listing of Artists but the same name will show repetitavly. How can i get the artists to show once in the listbox or listview? Hope someone can help.

    Thanks in advance.........

  2. #2
    Whistle Tip pimpJ's Avatar
    Join Date
    Apr 2004
    Location
    Metro, TX
    Posts
    523
    in what program/language ?
    I consider that our present sufferings are not worth comparing with the glory that will be revealed in us.

    www.neoterikos.com

  3. #3
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47

    Programming Language

    Quote Originally Posted by pimpJ
    in what program/language ?
    Oh Sorry VB6

  4. #4
    Whistle Tip pimpJ's Avatar
    Join Date
    Apr 2004
    Location
    Metro, TX
    Posts
    523
    I think some of your code would be necessary in order to really answer your question. I don't know VB6 anyways.. so
    I consider that our present sufferings are not worth comparing with the glory that will be revealed in us.

    www.neoterikos.com

  5. #5
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    post it. I'll show you
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  6. #6
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47
    Quote Originally Posted by frodobaggins
    post it. I'll show you

    Set rs = New ADODB.Recordset
    ' ----------------------------
    If Option1.value = True Then
    rs.Open ("select * from media where Artist like '" & Text1.Text & "%' order by artist"), dbCon

    While Not rs.EOF
    lstMedia.AddItem rs("Artist")
    rs.MoveNext
    Wend
    rs.Close
    Set rs = Nothing
    End If



    LstMedia is a simple listbox. Should i be using somthign else instead like a listview or grid possibly?

    Thanks frodo.....

  7. #7
    Raw Wave Confused's Avatar
    Join Date
    Aug 2003
    Location
    Essex, England
    Posts
    2,224
    You will want to do the following:


    Set rs = New ADODB.Recordset
    ' ----------------------------
    If Option1.value = True Then
    rs.Open ("SELECT DISTINCT artist FROM media WHERE artist like '" & Text1.Text & "%' order by artist"), dbCon

    While Not rs.EOF
    lstMedia.AddItem rs("Artist")
    rs.MoveNext
    Wend
    rs.Close
    Set rs = Nothing
    End If


    This should then only pull out the unique artists that match the description


    Garry
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  8. #8
    (6)
    (6) is offline
    Newbie (6)'s Avatar
    Join Date
    Oct 2004
    Posts
    47
    Quote Originally Posted by Confused
    You will want to do the following:
    Garry

    Thanks alot that works

  9. #9
    Raw Wave Confused's Avatar
    Join Date
    Aug 2003
    Location
    Essex, England
    Posts
    2,224
    Not a problem, glad I can help


    Garry
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  10. #10
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Bastard I was asleep !
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

Page 1 of 2 12 LastLast

Similar Threads

  1. put all info from mp3 cds in a database...
    By Raas in forum Off Topic
    Replies: 13
    Last Post: 09-23-2006, 11:34 AM
  2. Database build question
    By tmar89 in forum Media Engine
    Replies: 7
    Last Post: 08-17-2004, 12:21 PM
  3. Adding songs to database question
    By tmar89 in forum Media Engine
    Replies: 0
    Last Post: 07-03-2004, 04:40 PM
  4. Why use a database?
    By Noble in forum Media Engine
    Replies: 21
    Last Post: 05-18-2004, 03:32 PM
  5. a database of id3 info
    By etrik in forum Software & Software Development
    Replies: 16
    Last Post: 01-18-2001, 11:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •