PDA

View Full Version : Field Formats


Opiate
01-29-2003, 08:45 AM
Right, being relatively new to DB's and the like, using MS Access, what is the best way to store, for future display, a large block of text, keeping the original formatting (i.e line breaks are the main one). I guess i could use html code in the text block, that seems to work, but the must be a better way *crosses fingers*.
Text would be going from an input Form to the DB then to be displayed.

Thanks, and keep in mind, i'm a 'hobby' web...err...developer, if an answer comes, simple terms would surely help.

davidseye
01-29-2003, 10:46 AM
When running the text out of the db into a webpage for display within html a fairly standard practice would be, if using VB in ASP, for example to use the replace statement

strText = replace(rstemp("dbtext"), chr(13), "
")

The chr(13) is the char code for a line break. It replace the line breaks in your text to
, line breaks in html. This will put the text in your page with the same format it had in the textarea before you put it in the database.

bruce
01-29-2003, 11:45 AM
Try set the data type to memo field. it should retain all the formatting.

[b]quote:Originally posted by Opiate

Right, being relatively new to DB's and the like, using MS Access, what is the best way to store, for future display, a large block of text, keeping the original formatting (i.e line breaks are the main one). I guess i could use html code in the text block, that seems to work, but the must be a better way *crosses fingers*.
Text would be going from an input Form to the DB then to be displayed.

Thanks, and keep in mind, i'm a 'hobby' web...err...developer, if an answer comes, simple terms would surely help.



</blockquote id="quote"></font id="quote">