Field Formats

Discussion in 'Databases' started by Opiate, Jan 29, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. 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.
     
  2. 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.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Try set the data type to memo field. it should retain all the formatting.

    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">
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page