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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text data type

Status
Not open for further replies.

nettamer

MIS
Mar 17, 2002
24
0
0
US
I have a database with a "Text" datatype column. I can input text from the web pages' text box into the database. The problem is that when the text data is entered into the SQL database, it is crunched together and no formatting such as blank lines or blank spaces are saved. Is there a way that I can get SQL to save the formatting info as well, so that I can later display the info in the same format as when it was first inputted? Thanks.
 
in your web page put " wrap='hard' " in your textarea element. that should keep the blank lines.
 
Hey Dude....

I use plenty of Text columns and I have never run into the problem that you have come across. Please show me some code from you web pages so I can look through it and see if that is where your problem lies.
The reason I believe it may be your code is that SQL will take a string as it comes,therefore storing it the same way it was sent, meaning if you have a space between two words it should return it the same....
 
Thanks but the pages are still a work in progress. I don't mean that the spaces between the words are taken out, but that any extra blank spaces(more than 1) between words and the blank lines are taken out when going from the text box to SQL.

For instance, this post would be seen as only one paragraph....no blank lines and no indentations. I wants the inputs that goes into SQL to stay the same as I typed...with the blank line and the indentations, just like this board. I think the " wrap='hard' " should do the trick. Thanks for the helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top