Forum Moderators: open

Message Too Old, No Replies

classic asp: help with arrays

         

jm21

7:02 am on Oct 5, 2009 (gmt 0)

10+ Year Member



Hi, am rusty on my classic asp and am updating a website running on it. I've created a form which is getting values from which i need to loop and insert data using this values into a database.

The values are coming in with a comma separated e.g
recipient = Request.Form("fld_to")
Response.Write recipient gives the result 3,5,12,9 etc

My problem is, I need to take each value and insert data based on each value something like 'insert into tbldata where recipient = &recipient &.

How do i do a loop through a comma separated list like this? I just need an idea on what to do then i can take it from there

mattur

9:42 am on Oct 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



MyArray = Split(expression, delimiter)

populates MyArray with a 1-dim array of strings in expression, split on delimiter. HTH.