netsys
Posts: 39
|
Posted: 07/20/2010, 11:55 AM |
|
I've got some input fields that can have apostrophes in them, and when I try to use this data in a string, I get errors.
I found a reference to replacing them by doing this:
<%function cleanInput(byval str)
str = str & ""
str = trim(replace(str, "'", "''"))
cleanInput = str
end function%>
How can I implement something like this in CodeCharge? I would assume this would be in the before insert or before update function of the page with the inputs, but I can't seem to find any examples of how to implement this.
Thanks.
|
|
|
netsys
Posts: 39
|
Posted: 07/20/2010, 12:41 PM |
|
Actually, figured out a different way to do this. When pulling the data into a variable for use, I just cleaned it there. Example:
Dim varClassType
varClassType = Session("classtypesession")
varClassType = Replace(varClassType,"'","''")
Seems to work okay.
|
|
|
|