Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ADO (VB6 & Access2K)

    I created a simple adodc control. No problem there. However, I would like to be able to re-sort the recordset using different fields of the recordset. I've tried but can't hit the solution. Maybe no solution exist. Any assistance appreciated. Thanks in advance!

  2. #2
    New Lounger
    Join Date
    Mar 2002
    Location
    Connecticut, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ADO (VB6 & Access2K)

    Hi there,

    In part it depends on the kind of recordset you use. If you so something like this before you open the recordset

    rs.CursorLocation = adUseClient
    ...
    rs.Open
    etc.

    Then the Recorset.Sort command will be available to you.

    Since your using the adodc control I would look and see if there is a property that allows you to control the cursor location. If there is try setting it to client side. Then you can use code like so...

    myadoDC.recordset.Sort = Field1, Field2, etc.

    The recordset object also has a Filter property that would be set equal to a criteria string (where clause). This can be used on both client and server side cursors. Check the help for this one as it is particular that you use single quotes a text delimeters inside the criteria string.

    Check here for more info on these properties:

    http://msdn.microsoft.com/library/en-us/ad...propertyado.asp
    http://msdn.microsoft.com/library/en-us/ad...mdprofilter.asp

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ADO (VB6 & Access2K)

    Thanks!

Posting Permissions

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