Link to home
Start Free TrialLog in
Avatar of fskilnik
fskilnikFlag for Brazil

asked on

String error

Hi there!

To use as part of a xml file, I need to create a dynamic string with something like that:

<set label='631' value='0' /><set label='689' value='3' /><set label='699' value='4' />

With the following code I was ALMOST able to do it...

------------------------------------------------
Dim strSymbolsList

While ((Repeat1__numRows <> 0) AND (NOT rsQuantPercentiles.EOF))
  strSymbolsList = strSymbolsList & "set label='" & rsQuantPercentiles.Fields.Item("UserID").Value & "' value='" & rsQuantPercentiles.Fields.Item("NormalCDF").Value & "' />"
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  RecordCounter = RecordCounter+1
  rsQuantPercentiles.MoveNext()
Wend
---------------------------------------------------------------------

This code would generate, in the corresponding example, the following:

set label='631' value='0' />set label='689' value='3' />set label='699' value='4' />

As it easily seen, the ONLY problem was with the < character, presented in bold above, but NOT in my code (of course)!

The easy modification that I guess should work is:

 strSymbolsList = strSymbolsList & "<set label='" & rsQuantPercentiles.Fields.Item("UserID").Value & "' value='" & rsQuantPercentiles.Fields.Item("NormalCDF").Value & "' />"

But with little modification the "Response.Write(strSymbolsList)" gets nothing!

I cannot imagine why... how should I correct that, please?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Big Monty
Big Monty
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fskilnik

ASKER

Hello, Big Monty!

Thank you for coming again to rescue me from my ignorance!!   :)

You are right! In the source code I see that I really got what I wanted...

Thanks a LOT!

Kind Regards,
fskilnik.