Strip Command Perfunctory

Results 1 to 3 of 3

Thread: Strip Command Perfunctory

  1. #1
    Join Date
    Dec 1969

    Default Strip Command Perfunctory

    I am using the strip command to strip commas off a querystring. IT works 99% of the time, but I get a few where it strips incorrectly where there are no commas. Compare the folling two lines which have *at each strip point. The first is wrong. If there are no commas anywhere in the data, why is it stripping?<BR><BR>*MECHANICAL & PROCESS *Plate *Forgings Castings Magnets *66 <BR>*MECHANICAL & PROCESS Mixers Liquid Mag Drive *66 *1392 *2955 <BR><BR><BR>for each el in request.querystring<BR>FOR intloop = 1 to Request.querystring(el).Count<BR><BR>keys=request. querystring("code1")(intloop)<BR><BR>keysarray = Split(keys, ",")<BR><BR><BR>*MECHANICAL & PROCESS *Plate *Forgings Castings Magnets *66 <BR>*MECHANICAL & PROCESS Mixers Liquid Mag Drive *66 *1392 *2955

  2. #2
    Join Date
    Dec 1969

    Default RE: Strip Command Perfunctory

    Use the replace function to strip commas.<BR><BR>NoCommas = Replace(OldString,",","")<BR>

  3. #3
    Join Date
    Dec 1969

    Default *What* STRIP command? Split???

    I think you need to show the *real* code you are using. I can&#039;t believe that what you are showing *ever* works, since you do<BR><BR>FOR intloop = 1 to Request.querystring(el).Count<BR>keys=request.quer ystring("code1")(intloop)<BR><BR>whereas *surely* your real code looks more like:<BR><BR>FOR intloop = 1 to Request.querystring(el).Count<BR>keys=request.quer ystring(el)(intloop) &#039; note el instead of "code1"!!!<BR><BR>Also, DEBUG DEBUG DEBUG.<BR><BR>Print out the entire QueryString, before you start.<BR><BR>Print out each "el" as you come to it.<BR><BR>Print out each value of "keys" as you come to it.<BR><BR>I don&#039;t see how anybody could figure out a bug like this with as little information as you are showing.<BR><BR><BR>

Posting Permissions

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