Page 279 - DCAP408_WEB_PROGRAMMING
P. 279

Unit 12: Recordset Object




          applies to changes made with the AddNew, Update, and Delete methods. After you call the  Notes
          UpdateBatch method, you can use the Status property to check for any data conflicts in order to
          resolve  them.




             Notes  To execute a query without using a Command object, pass a query string to the
             Open method of a Recordset object. However, a Command object is required when you
             want to persist the command text and re-execute it, or use query parameters.

          The Mode property governs access permissions.
          The Fields collection is the default member of the Recordset object. As a result, the following
          two code statements are equivalent.

          Debug.Print objRs.Fields.Item(0)  ‘ Both statements print
          Debug.Print objRs(0)              ‘  the Value of Item(0).

          Self Assessment

          Fill in the blanks:
          8.   An …………………… of unique bookmark values that point to records in the Recordset object.

          9.   The filtered Recordset becomes the …………………… cursor.
          10.  The criteria string is made  up of  …………………… in the form FieldName-Operator-
               Value

          11.  Whenever the …………………… is set, the  current record  position moves to the  first
               record in the filtered subset of records in the Recordset.
          12.  The …………………… property governs access permissions.

          12.3 Fields Collection


          Contains all the Field objects of a Recordset or Record object.






          Remarks

          A Recordset object has a Fields collection made up of Field objects. Each Field object corresponds
          to a column in the Recordset. You can populate the Fields collection before opening the Recordset
          by calling the Refresh method on the collection.
          The Fields collection has an Append method, which provisionally creates and adds a Field object
          to the collection, and an Update method, which finalizes any additions or deletions.
          A Record object has two special fields that can be indexed with FieldEnum constants.  One
          constant accesses a field containing the default stream for the Record, and the other accesses a
          field containing the absolute URL string for the Record.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   273
   274   275   276   277   278   279   280   281   282   283   284