Using Array.. comma separated
Hi All,
I am generating a text area against each recordset to capture the comments from users.
response.write("<textarea name='comments' id='comments' style='width:200px;height:50px;background-color:#8DB6CD;'>" & arcomments &"</textarea>")
when I am reading the data using array â
cust_number=split(Request.Form("cnumber"),",")
acc_sts=split(Request.Form("selACCStatus"),",")
acc_comments=split(Request.Form("comments"),",")
Dim i
dim lower
dim upper
lower=Lbound(cust_number)
upper=Ubound(cust_number)
For i = lower to upper
if trim(acc_sts(i))<>"" then
sql="update top_accounts_review set status='" & trim(acc_sts(i)) &"' , updated_date='" & now() &"', updated_by='" & trim(uname) &"',comments='" & trim(acc_comments(i)) &"' where fiscal_week='" & trim(sel_week) &"' and customer_number='" & trim(cust_number(i)) &"'"
con.execute(sql)
'response.write(sql)
end if
next
everything is working fine here, The only issue I am facing â when user enters the comma (,) in text area, script is considering that as the comment for another recordset as I am splitting the comments based on comma,
what should I change in my script so that, it should not split the data based on comma entered by users.
I hope, I am able to explain the situation.
|