how do you do this?

Results 1 to 2 of 2

Thread: how do you do this?

  1. #1
    Join Date
    Dec 1969

    Default how do you do this?

    aMonthNames = array(do while objrs.eof=false if objrs.eof=false then response.write(cstr(x)&",") objrs.movenext end if loop)<BR><BR>the code above should produce <BR><BR><BR>aMonthNames = array("y","b","c","a","e","f",)<BR><BR>the problem is that how do you remove the last ","<BR><BR>in order to get a valid syntax<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Try a different approach

    If Not objrs.EOF Then <BR> strResults = objrs.GetString(,,",",",")<BR>End If<BR><BR>&#039;Is there a Leading Comma (I dont remember)<BR>If Left(strResults, 1) = "," Then<BR> strResults = Right(strResults, Len(strResults) - 1)<BR>End If<BR><BR>&#039;Remove a Trailing Comma<BR>If Right(strResults, 1) = "," Then<BR> strResults = Left(strResults, Len(strResults) - 1)<BR>End If<BR><BR>aMonthNames = Array(strResults)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts