Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Storing data which in the form of a list to database.

Storing data which in the form of a list to database.

Scheduled Pinned Locked Moved Database
questiondatabase
5 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    udaykatakam
    wrote on last edited by
    #1

    Can we store data which is in the form of a list(Bulleted list or Numbered list) to the database as is with out wrapping the text? If we cannot then what is the best way to store a list to database?

    -UdayKiran

    M 1 Reply Last reply
    0
    • U udaykatakam

      Can we store data which is in the form of a list(Bulleted list or Numbered list) to the database as is with out wrapping the text? If we cannot then what is the best way to store a list to database?

      -UdayKiran

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      Wow, this question is so wrong in so many ways. Databases store structured data (generally) A list (complete) is unstructured data Text wrap is not a concept a database has. The way to go Create a table with 3 fields ID int identity(1,1) Sequence int ListText varchar(a number > the possible text length) Into this you store the bullet number in Sequence and the text in ListText When you retrieve the data you order it by Sequence and it is up to you to display the text in the control you want.

      Never underestimate the power of human stupidity RAH

      U 1 Reply Last reply
      0
      • M Mycroft Holmes

        Wow, this question is so wrong in so many ways. Databases store structured data (generally) A list (complete) is unstructured data Text wrap is not a concept a database has. The way to go Create a table with 3 fields ID int identity(1,1) Sequence int ListText varchar(a number > the possible text length) Into this you store the bullet number in Sequence and the text in ListText When you retrieve the data you order it by Sequence and it is up to you to display the text in the control you want.

        Never underestimate the power of human stupidity RAH

        U Offline
        U Offline
        udaykatakam
        wrote on last edited by
        #3

        Yeah you are right thanks for your reply may be I did not frame my question right. Lets say my data is as follows.

        Col1

        Col2

        Col3

        1

        Line1 Line2 Line3

        xxx

        2

        ABC

        XYZ

        This is 2 rows of data and since database stores structured data first row would be stored as: 1 Line1Line2Line3 xxx So my question is what method should I adapt so that when I pull the data from the database I would know that the data in Col2 and Row1 is in the form of: Line1 Line2 Line3 I hope now I made my self clear.

        -UdayKiran

        M 1 Reply Last reply
        0
        • U udaykatakam

          Yeah you are right thanks for your reply may be I did not frame my question right. Lets say my data is as follows.

          Col1

          Col2

          Col3

          1

          Line1 Line2 Line3

          xxx

          2

          ABC

          XYZ

          This is 2 rows of data and since database stores structured data first row would be stored as: 1 Line1Line2Line3 xxx So my question is what method should I adapt so that when I pull the data from the database I would know that the data in Col2 and Row1 is in the form of: Line1 Line2 Line3 I hope now I made my self clear.

          -UdayKiran

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          I have the nasty suspicion you are working with a lousy data structure, I am assuming that Line1,Line2,Line3 should be stored as seperate pieces of data, in a related table. I do not know enough about your structure or what you are trying to acheive to give any useful feedback.

          U 1 Reply Last reply
          0
          • M Mycroft Holmes

            I have the nasty suspicion you are working with a lousy data structure, I am assuming that Line1,Line2,Line3 should be stored as seperate pieces of data, in a related table. I do not know enough about your structure or what you are trying to acheive to give any useful feedback.

            U Offline
            U Offline
            udaykatakam
            wrote on last edited by
            #5

            Alright Thanks for your time. Is there anybody who could help me with my problem.

            -UdayKiran

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups