CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2001
    Posts
    15

    Disconnected Recordset

    I have transfered the data from the database into a recordset. Now i want to query the recordset without going into the database. How will i do that ?

    Thanks


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Disconnected Recordset

    You can use the filter propertie of the recordset. This is like the WHERE clause of a SQL string, but without the WHERE keyword.

    rst.filter = "custid=1"





    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    May 2001
    Posts
    15

    Re: Disconnected Recordset

    How do I sort the recordset ?
    Thanks


  4. #4
    Join Date
    Feb 2001
    Posts
    54

    Re: Disconnected Recordset

    Hello:

    You can use MSFlexGrid. You have to connect the recordset to MSFlexGrid.
    Here is the code:
    MSHFlexGrid2.Col = 2 'The column you want to sort
    MSHFlexGrid2.Sort = 1 'Set the column to ascending order

    I hope I understand you correctly
    Good Luck




  5. #5
    Join Date
    Jan 2000
    Location
    Tallahassee, FL
    Posts
    121

    Re: Disconnected Recordset

    To filter use
    rs.Filter = "CustID = 1"

    To sort use
    rs.Sort = "CustID"

    It's all in the MSDN Documentation!


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

Featured