Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Access 2000 question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Id
Junior Member

USA
129 Posts

Posted - 09 July 2001 :  14:47:24  Show Profile  Visit Id's Homepage
I realize this isn't really an ASP question, but i'm hoping someone can point me in the right direction. In my quest to learn ASP and database integration, i've been tinkering around sorta building myself a really rudimentary forum of sorts. I've run into one snag. When i insert the data into my databse via a textarea it has line breaks and the like, but when I pull the data back out from the database, all my line breaks are gone, and all the text is turned into one big paragraph. Is there something i'm missing in setting up my table? or is there some sort of macro or the like I need to program into my table so it maintains my formatting.

Any help that can be offered would be much appreciated. Thanks


George_Zhu
Starting Member

China
46 Posts

Posted - 10 July 2001 :  09:01:36  Show Profile  Visit George_Zhu's Homepage
you have to use replace() to do this, and you can find such code in snitz code.

the simple way is replace(chr(30),"<br>"), something like this.

[font color=SlateBlue]Learning is all I want[/font]
-----------------------
http://www.zhujie.org
Go to Top of Page

MorningZ
Junior Member

USA
169 Posts

Posted - 10 July 2001 :  10:24:29  Show Profile  Visit MorningZ's Homepage  Send MorningZ an AOL message
be sure to only to the replace when displaying the data, don't replace inserting into the DB, otherwise when you edit the memo field, the carriage returns will be gone and it'll be hard coded with "<br>"

so on display

Response.Write Replace( rst("thisMemo"), vbCrlf, "<br>" )




Go to Top of Page

Id
Junior Member

USA
129 Posts

Posted - 10 July 2001 :  15:32:25  Show Profile  Visit Id's Homepage
I like it when it's simple stuff like that, thanks for your help :)

Go to Top of Page

Spoon
Average Member

Ireland
507 Posts

Posted - 11 July 2001 :  11:52:49  Show Profile  Visit Spoon's Homepage  Send Spoon an ICQ Message
you could do it this way aswell

textbox = Request.Form("textbox")
textbox = Server.HTMLEncode(textbox)

Spoon

"uohh look at me, ive got a signature, uohh look at me!" :)
Go to Top of Page

George_Zhu
Starting Member

China
46 Posts

Posted - 11 July 2001 :  20:25:28  Show Profile  Visit George_Zhu's Homepage
quote:

you could do it this way aswell

textbox = Request.Form("textbox")
textbox = Server.HTMLEncode(textbox)

Spoon

"uohh look at me, ive got a signature, uohh look at me!" :)



I am sorry to say this will not working.

replace is the normal way to achieve UBB function, you can look through snitz code to see what it is.

[font color=SlateBlue]Learning is all I want[/font]
-----------------------
http://www.zhujie.org
Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 11 July 2001 :  21:25:45  Show Profile
Look at the formatstring function in inc_functions.asp

Think Pink
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07