Compile a String of Email Addresses?
-
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???
-
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???
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...
-
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...