Results 1 to 3 of 3

Thread: adodc sort

  1. #1
    Guest

    Post

    I have a ado data control bound to a table. The table is sorted and indexed on its primary key which is numbered sequentially. But when browsing through added records, I find the sequence displayed randomly (as far as I can tell).

    Has anyone faced this dilemma before? I wonder if the data control has a sort method itself?


  2. #2
    Guest

    Post

    The recordsource property of your ado control has a spot where you can place some SQL code for your data to be displayed in some sort of orderly fashion.

    Example SQL:

    SELECT * FROM table1 ORDER BY date DESC

    "table1" is the name of your table
    "date" is a field in your table
    "DESC" is desending order

    you should be able to cut and paste the above code and substitute your table name
    and field name

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    There is a sort property of the data control without having the requery the server (I believe)

    USAGE:

    Adodc1.Recordset.Sort = "FieldName [ASC/DESC]"

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