Professional Web Applications Themes

Sorting a list held in a database - ASP Database

Hi all, I need to build a list of text items. Using asp I want to add text items to a list and then sort the list in the order I wish. The easiest and most flexible method I think would be to have a text box next to each item in the list. The list can then be sorted by placing your own numerical order next to each item and selecting a sort button. New items are placed, sorted and removed on the list everyday. It will never be completely wiped. It is a kind of 'To Do List' ...

  1. #1

    Default Sorting a list held in a database

    Hi all,

    I need to build a list of text items. Using asp I want to add text items to
    a list and then sort the list in the order I wish.

    The easiest and most flexible method I think would be to have a text box
    next to each item in the list. The list can then be sorted by placing your
    own numerical order next to each item and selecting a sort button.

    New items are placed, sorted and removed on the list everyday. It will never
    be completely wiped. It is a kind of 'To Do List' for a group of people in
    my office.

    I want to use asp and an access database. I have been trying various
    incarnations of code to make this work but am having no luck.

    One method I tried involved using 2 fields, the text item and a priority
    field. The priority field would hold the count of objects in the list but in
    the required order.

    The list could be displayed in order using the 'sort by priority' field.
    However I could not come up with an efficient means to re-sort the list.

    Anyone have any ideas.


    William E Hatto Guest

  2. #2

    Default Re: Sorting a list held in a database

    William E Hatto wrote:
    > Hi all,
    >
    > I need to build a list of text items. Using asp I want to add text
    > items to a list and then sort the list in the order I wish.
    >
    > The easiest and most flexible method I think would be to have a text
    > box next to each item in the list. The list can then be sorted by
    > placing your own numerical order next to each item and selecting a
    > sort button.
    >
    > New items are placed, sorted and removed on the list everyday. It
    > will never be completely wiped. It is a kind of 'To Do List' for a
    > group of people in my office.
    >
    > I want to use asp and an access database. I have been trying various
    > incarnations of code to make this work but am having no luck.
    I don't understand what ha"having no luck" means.
    >
    > One method I tried involved using 2 fields, the text item and a
    > priority field. The priority field would hold the count of objects in
    > the list but in the required order.
    That's how I would do it ...
    >
    > The list could be displayed in order using the 'sort by priority'
    > field. However I could not come up with an efficient means to re-sort
    > the list.
    >
    Why not submit the changes to the database and retrieve the items in the
    proper order using an Oreder By clause in your query?

    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  3. #3

    Default Re: Sorting a list held in a database

    I would like to re-sort the list by entering numbers next to just those
    items requiring resorting, not re-number the hold list.

    eg. If I wanted to resort the list with item 3 at the top, I would just
    place a 1 next to item 3. The asp page would then re-sort the list.

    I want back end code to do the work not the user. Any idea's as to the code
    required to do this?



    "Bob Barrows" <reb01501NOyahoo.SPAMcom> wrote in message
    news:%23N8BpFFMEHA.3348TK2MSFTNGP09.phx.gbl...
    > William E Hatto wrote:
    > > Hi all,
    > >
    > > I need to build a list of text items. Using asp I want to add text
    > > items to a list and then sort the list in the order I wish.
    > >
    > > The easiest and most flexible method I think would be to have a text
    > > box next to each item in the list. The list can then be sorted by
    > > placing your own numerical order next to each item and selecting a
    > > sort button.
    > >
    > > New items are placed, sorted and removed on the list everyday. It
    > > will never be completely wiped. It is a kind of 'To Do List' for a
    > > group of people in my office.
    > >
    > > I want to use asp and an access database. I have been trying various
    > > incarnations of code to make this work but am having no luck.
    >
    > I don't understand what ha"having no luck" means.
    > >
    > > One method I tried involved using 2 fields, the text item and a
    > > priority field. The priority field would hold the count of objects in
    > > the list but in the required order.
    >
    > That's how I would do it ...
    >
    > >
    > > The list could be displayed in order using the 'sort by priority'
    > > field. However I could not come up with an efficient means to re-sort
    > > the list.
    > >
    > Why not submit the changes to the database and retrieve the items in the
    > proper order using an Oreder By clause in your query?
    >
    > Bob Barrows
    > --
    > Microsoft MVP - ASP/ASP.NET
    > Please reply to the newsgroup. This email account is my spam trap so I
    > don't check it very often. If you must reply off-line, then remove the
    > "NO SPAM"
    >
    >

    William E Hatto Guest

Similar Threads

  1. Sorting Database Results in PHP
    By TheRapidGroup in forum Dreamweaver AppDev
    Replies: 4
    Last Post: February 27th, 01:45 PM
  2. Why Does Sorting Require Another Call To The Database?
    By Lisa in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: August 2nd, 08:54 PM
  3. Sorting the contents of a list backwards
    By minerale webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 4
    Last Post: December 1st, 11:15 PM
  4. Sorting Font List takes forever!
    By Don McCahill in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 6
    Last Post: September 3rd, 08:45 PM
  5. Sorting property list by the values
    By Arctic Flea webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 2
    Last Post: July 18th, 01:14 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139