I need to take the text that will be typed in paragraph form by the user
(textarea field) and do two things with it:
1. Store it in a SQL Server database field
2. Send it in an email upon page submit.
Of course, single quotes have caused problems, so I have this code:
strInternalDesc =
Replace(Trim(Request.Form("InternalDesc")),"'","''")
Problem is, it shows up like this in the email that is sent:
==============================
We''re in the process of
==============================
I would like to get rid of the double apostrophes, but not sure how. Went to
an article on ASPFAQ, and saw something which directed me to do this:
strInternalDesc =
Replace(Trim(Request.Form("InternalDesc")),"'",chr(34))
However, that just makes it a regular double-quote. I guess I could try and
find out what the character number for apostrophes are, but not sure where
that is. Besides, will that mess up my SQL Server or the email if I do that?
TIA
Well, either send the e-mail before replacing and updating the database, or
else have two variables.
strInternalDescMail = Trim(Request.Form("InternalDesc"))
strInternalDescDB = Replace(strInternalDescMail,"'","''")
A
"Aaron [SQL Server MVP]" <ten...@dnartreb.noraa> wrote in message
news:emUX%23FrlE...@TK2MSFTNGP14.phx.gbl...
Ray at work
"middletree" <middl...@htomail.com> wrote in message
news:%23GX$YErlE...@tk2msftngp13.phx.gbl...
Hey, don't feel bad. At least you aren't one of those people stumbling on
the idea of how to send the content in an e-mail and to the database, all in
the same page. I don't understand the confusion there, do they think that
if you send an e-mail or update the database, you can't do anything else?
The page just ends? It hasn't come up recently but it has come up often
enough that I smack my head and ask, "why this again?"
"Aaron [SQL Server MVP]" <ten...@dnartreb.noraa> wrote in message >
thanks
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OtguLKrl...@TK2MSFTNGP15.phx.gbl...
Ray at work
"middletree" <middl...@htomail.com> wrote in message
news:ORnOyTzl...@TK2MSFTNGP14.phx.gbl...