Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. pRecordSet->PutMaxRecords(10); Doesnot work ?

pRecordSet->PutMaxRecords(10); Doesnot work ?

Scheduled Pinned Locked Moved Database
c++databasehelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ssirisha
    wrote on last edited by
    #1

    I am Using ADO(Visual C++) and Access 2000 database. Trying to limit the number of records returned by the recordset with PutMaxRecords(x), and the recordset returns all records. Thanks for your help in advance.

    N 1 Reply Last reply
    0
    • S ssirisha

      I am Using ADO(Visual C++) and Access 2000 database. Trying to limit the number of records returned by the recordset with PutMaxRecords(x), and the recordset returns all records. Thanks for your help in advance.

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      This will not work on an Access database, see here [^]. If you are still want to do something like that you could change your SELECT statement to look something like this:

      "SELECT TOP 10 * FROM [myTable] WHERE user_id = 1"
      

      Hope This Helps :) Nick Parker
      **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown


      **

      S 1 Reply Last reply
      0
      • N Nick Parker

        This will not work on an Access database, see here [^]. If you are still want to do something like that you could change your SELECT statement to look something like this:

        "SELECT TOP 10 * FROM [myTable] WHERE user_id = 1"
        

        Hope This Helps :) Nick Parker
        **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown


        **

        S Offline
        S Offline
        ssirisha
        wrote on last edited by
        #3

        Perfect. Thanks a bunch.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups