Results 1 to 5 of 5

Thread: Sorting records?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Fremont Ohio 43420
    Posts
    253

    Question

    Hello

    Is there any way that you can sort the records in ado data control? I have the records sorted in ascending order in the database but when I scroll the records on my form they are in descending order.

    Any suggestions?

  2. #2
    Lively Member
    Join Date
    Jul 2000
    Posts
    94
    Change your SQL statement. Not that familar with ado, but here is a sample SQL statement.
    "Select * from Table order by Name"

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    you forgot the sort order...Dsc for decending.

    "Select * from Table order by Name Asc"
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Fremont Ohio 43420
    Posts
    253

    Wink

    Thank you CthuluDragon, and HeSaidJoe both of your suggestions worked. HeSaidJoe just add a little secruity to the sql statement.

    Thanks again!!

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Wasn't sure what the default was. Since both work, the default is ASC...so CthulhuDragon, my apologies...you didn't forget..you knew better....I should have known it wouldn't be Dsc...in hind sight, that's as bad as thinking right to left as the default in reading.

    Later.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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