Page 286 - DCAP408_WEB_PROGRAMMING
P. 286

Web Programming




                    Notes             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.
                                      There are four different cursor types defined in ADO. They are dynamic cursor, keyset
                                       cursor, static cursor and forward-only cursor.

                                      Set the CursorType property prior to opening the Recordset to choose the cursor type, or
                                       pass a CursorType argument with the Open method.
                                      CursorType Property indicates the type of  cursor used in a Recordset object. It set or
                                       returns a CursorTypeEnum value. The default value is adOpenForwardOnly.
                                      CursorLocation Property indicates the location of the cursor service. It sets or returns a
                                       Long value that can be set to one of the CursorLocationEnum values.
                                      Filter Property indicates a filter for data in a Recordset. It sets or returns a Variant value,
                                       which can contain one of the following (a) Criteria string: a string made up of one or more
                                       individual clauses concatenated with AND or OR operators (b) Array of bookmarks: an
                                       array  of  unique bookmark  values  that point to  records in the Recordset object  c)  A
                                       FilterGroupEnum value
                                      Fields Collection contains all the Field objects of a Recordset or Record object.
                                      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 access a field containing the default stream for the Record, and the other accesses
                                       a field containing the absolute URL string for the Record.

                                      If you attempt to reference a nonexistent field by name, a new Field object will be appended
                                       to the Fields collection with a Status of adFieldPendingInsert. When you call Update, ADO
                                       will create a new field in your data source if allowed by your provider.
                                      When a Recordset object is passed across processes, only the rowset values are marshalled, and
                                       the properties of the Recordset object are ignored. During unmarshalling, the rowset is unpacked
                                       into a newly created Recordset object, which also sets its properties to the default values.

                                   12.5 Keywords

                                   ADODB.Recordset: It is the ProgID that should be used to create a Recordset object.

                                   Append Method: It provisionally creates and adds a Field object to the collection.
                                   CursorLocation Property: It indicates the location of the cursor service. It sets or returns a Long
                                   value that can be set to one of the CursorLocationEnum values.

                                   CursorType Property: Indicates the type of cursor used in a Recordset object.
                                   Dynamic Cursor: Allows you to view additions, changes, and deletions by other users.
                                   Field Object: It corresponds to a column in the Recordset.
                                   Fields Collection: It contains all the Field objects of a Recordset or Record object.
                                   Filter Property: It indicates a filter for data in a Recordset. It sets or returns a Variant value,
                                   which can contain either criteria string, array of bookmarks or a FilterGroupEnum value.


          280                               LOVELY PROFESSIONAL UNIVERSITY
   281   282   283   284   285   286   287   288   289   290   291