Results 1 to 2 of 2

Thread: Storing Info separated by (,) in a database

  1. #1

    Thread Starter
    Addicted Member Smie's Avatar
    Join Date
    Jun 1999
    Location
    Columbus, OH
    Posts
    249

    Post

    If I store info like:

    Hello , My , Name , Is , Smie

    That in a database, and bring it back, how would I be able to separate that info, and place each individual word, in a listbox? Thanx

  2. #2
    Guest

    Post

    assuming that each word is delimited by a comma you could use Split()

    Dim arySingleWordsArray

    arySingleWordsArray = Split("Hi,My,Name,Is, Smie",",")

    after that line, arySingleWordsArray would contain a zero-based single dimension array of each word separated by a comma.
    arySingleWordsArray(0) = "Hi"
    arySingleWordsArray(1) = "My"
    arySingleWordsArray(2) = "Name"
    arySingleWordsArray(3) = "Is"
    arySingleWordsArray(4) = "Smie"

    ...from here you can spin through and add each one to a list box.

Posting Permissions

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



Click Here to Expand Forum to Full Width