Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hidden Carrage returns in a string?

Status
Not open for further replies.

nhoellei

Programmer
Feb 1, 2002
13
US
I have a page that consists of a textarea field, for comments. I am running into trouble inserting the text in the box to the DB. It's SQL Server with a varchar datatype.

Everything submits fine if you enter text with no carrage returns, however, if you are typing along in the text box and hit 'enter', all text up to the carrage return get's inserted into the DB. It looks like any remaining text gets discarded.

Is there a way to use the replace function to replace the carrage returns with a space so I can submit the full string? I have tried chr(13)&chr(10) and vbCrLf, still no luck.
 
newstring = replace(memofield, chr(13)+chr(10), &quot;<BR>&quot;)


do a search here and you'll find lots of examples for you to look at

hth
Bastien

There are many ways to skin this cat,
but it still tastes like chicken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top