프로그래밍/ASP

ASP - Split, For, UBound 활용하여 다중으로 넘어온 값 분할하기

Doonee 2013. 8. 20. 17:31
반응형

lecArrayValue = Request("LecNum")

lecSplitedValue = Split(lecArrayValue, ",")


For i=lbound(lecSplitedValue) To UBound(lecSplitedValue)

     If lecSplitedValue(i) <> "" Then

         lecValue = Split(lecSplitedValue(i), "^")

     End if


    strSql = "insert into nsurveyhistory(applynum, lecnum, wishlectime, surveyip) values (" & userNum & ", '" & lecValue(0) & "', '" & lecValue(1) & "', '" & Request.ServerVariables("REMOTE_ADDR") & "')"  

    Set objRs=objConnLawDB.Execute(strSql)

Next