Encoding a string in lotusscript

Am trying to use thefollowing code to generate a url that is encoded.parts of the code are as follows:

Dim xx As String

Dim lstData List As String

'Replace all &'s with #'s

'lstData(“NEWVALUE”) is equal to “Hugh & Me”

lstData(“NEWVALUE”) = Replace(lstData(“NEWVALUE”),“&”,“#”)

xx = lstData(“NEWVALUE”)

Msgbox("xx " + xx ) ’ Displays “XX Hugh # Me”

lstData(“NEWVALUE”) = Evaluate({@URLEncode(“Domino”;“} + xx + {”)})

I get the following error message:

Error #13 Type mismatch

Can anyone tell me where the type mismatch is and what I am doing wrong?

Please?

Subject: Encoding a string in lotusscript

You don’t need to come here to ask where your type mismatch is. Either use the Notes debugger, or use On Error in your code to trap the error and display the value of Erl.

Subject: Encoding a string in lotusscript

Evaluate returns a Variant Array, not a String.

Once you fix that there is still a problem with your @formula: if there happen to be " or \ characters in your lstData(“NEWVALUE”), the formula that you create for the Evaluate call has the wrong syntax.

cheers,

Bram