Instead of For...Endfor, use Chrtran() to remove the characters.
BodyValue = chrtran(BodyValue,chr(34)+chr(39),'')
As for the other way, supend the program and examine the SQL command variable to see if it is valid. You could also use SQL Profiler to see what is being sent to the other end to try and debug it.
>James,
>The body is a variable which hold the email.
>I think the commas are there.
>
>I got it to working in a other way, but I would like to see it working like you say.
>
>here is what I did,
>I took off the , and "
>
>for x = 1 to len(trim(bodyValue))
> if mid(trim(bodyValue),x,1) = Chr(34) or mid(trim(bodyValue),x,1) = Chr(39) then
> 'do nothing
> else
> newBody = newBody + mid(trim(bodyValue),x,1)
> end if
>next
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao