ASP/VBScript to randomly select name from csv?

Discussion in 'ASP General' started by Scott Gordo, Mar 9, 2006.

  1. Scott Gordo

    Scott Gordo Guest

    <!--Newbie warning-->
    I've got a csv file with names, addresses, emails, etc.
    I've been asked to randomly select a name from a csv file.
    I've found plenty of RandNum examples, but I'm not sure how to apply it
    to these names.
    Can anyone point out a sample I could use?
    TIA!
    Scott
     
    Scott Gordo, Mar 9, 2006
    #1
    1. Advertisements

  2. Scott Gordo

    Scott Gordo Guest

    Sorry, buy RandNum I meant Randomize.
    /s
     
    Scott Gordo, Mar 9, 2006
    #2
    1. Advertisements

  3. Scott Gordo

    MikeR Guest

    Read the file into an array. Use a random number (generated so that it
    is within the bounds of the array) to index into the array.
    MikeR
     
    MikeR, Mar 10, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.