Some of my values coming back in my recordset have a ' in them. This data is being read into a JS array so I need to change the ' in the result to the ' html hex code.

Ok, so sounds you need to HTML encode the string in the record set...

Try using Server.HTMLEncode(yourString)

Not sure if this will work for the apostrophe.

If that doesnt work for you, I would try using the Replace method:

variableName = Replace(variableName, "'", "'")

I found the REPLACE function after I asked this question. Sorry, got it working now.