Page 273 - DCAP408_WEB_PROGRAMMING
P. 273

Unit 12: Recordset Object




          page, because it means that the connection to the data doesn’t have to be opened each time we  Notes
          create a recordset. We can either update record in records in a recordset one record at a time, or
          we can batch a set of changes to various records, and then execute database update in one step.
          Recordset objects can also be disconnected from a data store, so that changes can be made to the
          data in an off-line state, and then updated when the recordset is reconnected to the database.

               !
             Caution  This allows for the movement of entire recordsets from the server to client for
            update and manipulation.

          12.1 The Recordset Object







          Remarks

          You use  Recordset objects to manipulate data from a provider. When you  use ADO,  you
          manipulate data almost entirely using Recordset objects. All Recordset objects consist of records
          (rows) and fields (columns). Depending on the functionality supported by the provider, some
          Recordset methods or properties may not be available.
          ADODB.Recordset  is the ProgID that should be  used to create a Recordset object. Existing
          applications that reference the outdated ADOR. Recordset ProgID will continue to work without
          recompiling, but new development should reference ADODB.Recordset.




              Task  Analyze practically that how Recordset object represents a set of records returned
            from a database query.
          There are four different cursor types defined in ADO:

              Dynamic cursor — allows you to view additions, changes, and deletions by other users;
               allows all types of movement through the Recordset that doesn’t rely on bookmarks; and
               allows bookmarks if the provider supports them.
              Keyset cursor — behaves like a dynamic cursor, except that it prevents you from seeing
               records that other users add, and prevents access to records that other users delete. Data
               changes by other users will still be visible. It always supports bookmarks and therefore
               allows all types of movement through the Recordset.

              Static cursor — provides a static copy of a set of records for you to use to find data or
               generate reports; always allows bookmarks and therefore allows all types of movement
               through the Recordset. Additions, changes, or deletions by other users will not be visible.
               This is the only type of cursor allowed when you open a client-side Recordset object.

              Forward-only cursor — allows you to only scroll forward through the Recordset. Additions,
               changes, or deletions by other users will not be visible. This improves performance in
               situations where you need to make only a single pass through a Recordset.






                                           LOVELY PROFESSIONAL UNIVERSITY                                   267
   268   269   270   271   272   273   274   275   276   277   278