Results 1 to 4 of 4

Thread: sql 2005 type of field

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2008
    Posts
    21

    sql 2005 type of field

    Hi

    I am using SQL server 2005 and I want to create a table that has 2 fields,one field of type integer but the other field i don't know which type to assign to it.

    Let me explain I want to store a paragraph that has bullets into this field and using a RichTextBox I want to display the field with exactly the same formatting in my form

    example:I want to save the following text with the same formatting to the field
    Soft drinks
    • Orange
    • Lemon
    • water


    Which type of field should I use?

    thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: sql 2005 type of field

    varchar

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: sql 2005 type of field

    Agreed, and what you save to it should be the RTFText (or similar name) property of the RichTextBox, which contains the text and formatting in a textual form.

  4. #4
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: sql 2005 type of field

    Depending on what you're using the rich text box for it can be worth saving the .text property as well as the richtext property. Strictly speaking it breaks third normal form but it makes life alot easier when you come to do comparisons in sql statements.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width