Page 275 - DCAP408_WEB_PROGRAMMING
P. 275

Unit 12: Recordset Object




                                                                                                Notes


             Notes  Although Supports (adUpdateBatch) may be true for dynamic and forward-only
             cursors, for batch updates you should use either a keyset or static cursor. Set the LockType
             property to adLockBatchOptimistic and the CursorLocation property to adUseClient to
             enable the Cursor Service for OLE DB, which is required for batch updates.
          The CursorType property is read/write when the Recordset is closed and read-only when it is
          open.
          Remote Data Service Usage When used on a client-side Recordset object, the CursorType property
          can be set only to adOpenStatic.

                    CursorLocation Property
          Indicates the location of the cursor service.

          Settings and Return Values

          Sets or returns a Long value that can be set to one of the CursorLocationEnum values.

          Remarks

          This property allows you to choose between various cursor libraries accessible to the provider.
          Usually, you can choose between using a client-side cursor library or one that is located on the
          server.
          This property setting affects connections established only after the property has been set. Changing
          the CursorLocation property has no effect on existing connections.
          Cursors returned by the Execute method inherit this setting. Recordset objects will automatically
          inherit this setting from their associated connections.

          This property is read/write on a Connection or a closed Recordset, and read-only on an open
          Recordset.
          Remote Data Service Usage When used on a client-side Recordset or Connection object, the
          CursorLocation property can only be set to adUseClient.
          You can create as many Recordset objects as needed.
          When you open a Recordset, the current record is positioned to the first record (if any) and the
          BOF and EOF properties are set to False. If there are no records, the BOF and EOF property
          settings are True.

          You can use the MoveFirst, MoveLast, MoveNext, and MovePrevious methods; the Move method;
          and the AbsolutePosition, AbsolutePage, and Filter properties to reposition the current record,
          assuming  the provider supports the relevant functionality. Forward-only Recordset  objects
          support only the MoveNext method. When you use the Move methods to visit each record (or
          enumerate the Recordset), you  can use the BOF and EOF properties to  determine if you’ve
          moved beyond the beginning or end of the RFilter Property




              Task  Evaluate the two types of updating that Recordset Object supports.







                                           LOVELY PROFESSIONAL UNIVERSITY                                   269
   270   271   272   273   274   275   276   277   278   279   280