Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Compile a String of Email Addresses?

Compile a String of Email Addresses?

Scheduled Pinned Locked Moved Web Development
question
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robby
    wrote on last edited by
    #1

    I have a scenario: I have a table names DSAUsers that includes a user's User ID, First name, Last name, password, profile and email address. What I want to do is: SELECT email FROM DSAUsers WHERE profile = 'EQUIFAX' I have several people with the EQUIFAX profile. I want to get all the email addresses and compile a string of them seperated by ";" so that I can include them on my CDONTS TO line. How the heck do I do this? I can get my string to write out to the screen by Response.Write, Movenext, Loop, but I can't get the thing to write to an object that I can use...HOW DO I DO THIS PLEASE???

    B 1 Reply Last reply
    0
    • R Robby

      I have a scenario: I have a table names DSAUsers that includes a user's User ID, First name, Last name, password, profile and email address. What I want to do is: SELECT email FROM DSAUsers WHERE profile = 'EQUIFAX' I have several people with the EQUIFAX profile. I want to get all the email addresses and compile a string of them seperated by ";" so that I can include them on my CDONTS TO line. How the heck do I do this? I can get my string to write out to the screen by Response.Write, Movenext, Loop, but I can't get the thing to write to an object that I can use...HOW DO I DO THIS PLEASE???

      B Offline
      B Offline
      Bullschmidt
      wrote on last edited by
      #2

      Perhaps try something like this: Within the recordset loop: strEmail = strEmail & objRS("MyEmailField") & ";" And after the loop: ' Get rid of the final ; If strEmail <> "" Then strEmail = Left(strEmail, Len(strEmail) - 1) End If Best regards, J. Paul Schmidt - Freelance ASP Web Developer http://www.Bullschmidt.com - To put live data on the Web...

      R 1 Reply Last reply
      0
      • B Bullschmidt

        Perhaps try something like this: Within the recordset loop: strEmail = strEmail & objRS("MyEmailField") & ";" And after the loop: ' Get rid of the final ; If strEmail <> "" Then strEmail = Left(strEmail, Len(strEmail) - 1) End If Best regards, J. Paul Schmidt - Freelance ASP Web Developer http://www.Bullschmidt.com - To put live data on the Web...

        R Offline
        R Offline
        Robby
        wrote on last edited by
        #3

        This worked like a charm...I knew it would be something simple! Thanks a million for your help!! Robby

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups