I know this is a very commonly asked question, but I can't find a solution
anywhere that I have looked.
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 7 2769
> 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 ==============================
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
Makes sense. Thanks!
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:em****************@TK2MSFTNGP14.phx.gbl... 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 ============================== 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
My thoughts on this are here: http://groups.google.com/groups?selm...phx.gbl&rnum=1
Ray at work
"middletree" <mi********@htomail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl... I know this is a very commonly asked question, but I can't find a solution anywhere that I have looked.
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
> Makes sense. Thanks!
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?"
I hope I don't cause any head injuries for you!
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message > I smack my head and ask, "why this again?"
Thanks. I like this. I have a question or two about a couple of things I saw
in the code, but I'll try and work those out.
thanks
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:Ot**************@TK2MSFTNGP15.phx.gbl... My thoughts on this are here: http://groups.google.com/groups?selm...phx.gbl&rnum=1 Ray at work
Feel free to post back the questions if you don't. :]
Ray at work
"middletree" <mi********@htomail.com> wrote in message
news:OR**************@TK2MSFTNGP14.phx.gbl... Thanks. I like this. I have a question or two about a couple of things I saw in the code, but I'll try and work those out.
thanks
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:Ot**************@TK2MSFTNGP15.phx.gbl... My thoughts on this are here: http://groups.google.com/groups?selm...phx.gbl&rnum=1 Ray at work
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: middletree |
last post by:
Ray recently answered my question about apostrophe replacement with advice
on how to use 2 functions for hwich he gave me some code, called SafeIn and
Safeout
I'm having a hard time seeing the...
|
by: Michael Sterling |
last post by:
i'm using delphi 7 and have a query in which i'm trying to find names
that have an apostrophe in them, i.e. "o'mally". my problem is that
when i write my select statement i can't get the quotes...
|
by: Michael |
last post by:
Hallo,
for some reasons of calling functions with parameters, i have to test
if a text-node contains an apostrophe. My problem is that i cannot
write something like <xsl:if test="contains(.,...
|
by: Richard Hollenbeck |
last post by:
To prevent future apostrophe bugs and errors, isn't it just simpler to
forbid an apostrophe from being entered into a text field? For example,
couldn't "Alice's Restaurant" be changed to "Alices...
|
by: congngo |
last post by:
Hi all
Every time I export a table into an excel spreadsheet. It has a
leading apostrophe on every cells. This drive me nut. I have to do a
work around by export table into a txt file than...
|
by: spacehopper_man |
last post by:
hi -
I am having "apostrophe in sql" problems ;)
I am executing a stored procedure on SQL Server - and passing in a
string parameter.
the string has a single apostrophe in it.
the call...
|
by: Rose |
last post by:
Hi all,
I'm trying to create a clickable link, but the pesky apostrophe is
preventing the link from getting displayed properly. I'm displaying the
contents of a folder (with contains the...
|
by: Tom |
last post by:
Hi, I have some kind of problems with an apostrophe character ('). I would
like to select from DataTable DataRow containing value horses' (with an
apostrophe on the end). But when I do it in an...
|
by: Thomas 'PointedEars' Lahn |
last post by:
Jukka K. Korpela wrote:
IBTD. For example, in English it is customary (and AIUI expected) to use
the character that ’ represents should be used to delimit a quotation
within direct speech...
|
by: Razzbar |
last post by:
I'm working on a bookmarklet that grabs information from a page and
submits it to a server. Yet another social bookmarking application.
I'm having trouble with page titles that include an...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |