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
  1. Home
  2. General Programming
  3. Visual Basic
  4. Retrieving data in parts

Retrieving data in parts

Scheduled Pinned Locked Moved Visual Basic
helpquestion
7 Posts 3 Posters 0 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.
  • D Offline
    D Offline
    Dayekh
    wrote on last edited by
    #1

    Hi all, I'm trying to allow the user to store an article in a table where the article body can take ANY number of parts each displayed as a separate page on a webpage. I thought I would store the entire article in the Article table but separated by a delimiter like, the only problem is, after I store the record, how would I go ahead a retrieve the data IN PARTS so that it can be displayed in a repeater?

    L D 2 Replies Last reply
    0
    • D Dayekh

      Hi all, I'm trying to allow the user to store an article in a table where the article body can take ANY number of parts each displayed as a separate page on a webpage. I thought I would store the entire article in the Article table but separated by a delimiter like, the only problem is, after I store the record, how would I go ahead a retrieve the data IN PARTS so that it can be displayed in a repeater?

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, I would not do that. I suggest you store the smallest part you're interested in as one item, then build larger stuff from multiple items. This is similar to storing first name and last name separately, it gives easy access to both of them, and when you need both together, you can easily combine them. So create two tables: table "article" holds overall information on an article (ID, title, author, date, ...); table "page" holds the content of one page, the page number, and the article ID. :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


      Prolific encyclopedia fixture proof-reader browser patron addict?
      We all depend on the beast below.


      D 1 Reply Last reply
      0
      • D Dayekh

        Hi all, I'm trying to allow the user to store an article in a table where the article body can take ANY number of parts each displayed as a separate page on a webpage. I thought I would store the entire article in the Article table but separated by a delimiter like, the only problem is, after I store the record, how would I go ahead a retrieve the data IN PARTS so that it can be displayed in a repeater?

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        I wouldn't store the entire article commna delimited. What if there's a comma in the article? I'd store the parts in some kind of Parts table, then have another table that tells which parts go with which article.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        D 1 Reply Last reply
        0
        • L Luc Pattyn

          Hi, I would not do that. I suggest you store the smallest part you're interested in as one item, then build larger stuff from multiple items. This is similar to storing first name and last name separately, it gives easy access to both of them, and when you need both together, you can easily combine them. So create two tables: table "article" holds overall information on an article (ID, title, author, date, ...); table "page" holds the content of one page, the page number, and the article ID. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          Prolific encyclopedia fixture proof-reader browser patron addict?
          We all depend on the beast below.


          D Offline
          D Offline
          Dayekh
          wrote on last edited by
          #4

          Hi Luc, Thanks for the reply. Let me just make things clear. 1 - I will store the small details in the Article table. 2 - I will store the parts of the articles as separate records in a "Parts" table. 3 - Each part will have an article ID. 4 - I will call details FROM article table AND parts table WHERE ID is the one clicked on by the user One last problem: Due to the user being able to store ANY number of parts PER article, how do I connect each part to a repeater? I would like the repeater to do "Paging" on each part. Is that possible?

          L 1 Reply Last reply
          0
          • D Dave Kreskowiak

            I wouldn't store the entire article commna delimited. What if there's a comma in the article? I'd store the parts in some kind of Parts table, then have another table that tells which parts go with which article.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            D Offline
            D Offline
            Dayekh
            wrote on last edited by
            #5

            Thanks for the input.. check out my reply to the previous post. I still have one issue :(

            1 Reply Last reply
            0
            • D Dayekh

              Hi Luc, Thanks for the reply. Let me just make things clear. 1 - I will store the small details in the Article table. 2 - I will store the parts of the articles as separate records in a "Parts" table. 3 - Each part will have an article ID. 4 - I will call details FROM article table AND parts table WHERE ID is the one clicked on by the user One last problem: Due to the user being able to store ANY number of parts PER article, how do I connect each part to a repeater? I would like the repeater to do "Paging" on each part. Is that possible?

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Dayekh wrote:

              3 - Each part will have an article ID.

              Yes, store each part/page of an article with its part/page number and with the one article ID so it points into the right row of your articles table. I don't know about the Repeater Control, I've never used any, I haven't done any ASP.NET However I trust it can be done, in fact I expect it to be pretty simple. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              Prolific encyclopedia fixture proof-reader browser patron addict?
              We all depend on the beast below.


              D 1 Reply Last reply
              0
              • L Luc Pattyn

                Dayekh wrote:

                3 - Each part will have an article ID.

                Yes, store each part/page of an article with its part/page number and with the one article ID so it points into the right row of your articles table. I don't know about the Repeater Control, I've never used any, I haven't done any ASP.NET However I trust it can be done, in fact I expect it to be pretty simple. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                Prolific encyclopedia fixture proof-reader browser patron addict?
                We all depend on the beast below.


                D Offline
                D Offline
                Dayekh
                wrote on last edited by
                #7

                Thanks for the reply. I will research Custom Paging. I'm sure the answer lies there. Cheers!

                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