Page 287 - DCAP408_WEB_PROGRAMMING
P. 287

Unit 12: Recordset Object




          Forward-only Cursor: Allows you to only scroll forward through the Recordset.         Notes
          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.

          Static Cursor: Provides a static copy of a set of records for you to use to find data or generate
          reports. This is the only type of cursor allowed when you open a client-side Recordset object.
          The Recordset Object: It represents a set of records returned from a database query. It is used to
          examine and manipulate data within a database.
          Update method: It finalizes any additions or deletions.

          12.6 Review Questions


          1.   Examine the default property of the Field object? Give examples
          2.   Explain how many field objects exist in the Fields collection?
          3.   What does the name property of the Field object return? Is it possible to both sort and filter
               a Record set?
          4.   Create two ASP pages, a form creation Web page (SelectPrice.asp) and a form processing
               script (ListStocksByPrice.asp). In SelectPrice.asp, the user should be shown a form into
               which  he  can  enter  a  desired  maximum  price.  When  the  for  is  submitted,
               ListStocksByPrice.asp will list all the stocks in the Portfolio table that cost strictly less than
               the price entered by the user.
          5.   The Recordset object is probably the most commonly used ADO object. Comment
          6.   Substantiate what are the types of cursors defined in ADO?
          7.   Analyze how the cursor type set and using which method it is set?

          8.   The cursor type can be set by the CursorType property or by the CursorType parameter in
               the Open method. Explain with the program.
          9.   The ADO Recordset object is used to hold a set of records from a database table. Explain

          10.  In ADO, this object is the most important and the one used most often to manipulate data
               from a database. Do you agree with this statement? Why or why not? Give reasons to
               support your answer.

          Answers: Self  Assessment

          1.   Fields collection                 2.  Recordset
          3.   Static cursor                     4.  Open method
          5.   provider                          6.  CursorLocationEnum

          7.   Supports                          8.  Array
          9.   Current                           10.  Clauses
          11.  Filter property                   12.  Mode
          13.  FieldEnum                         14.  unmarshalling

          15.  column






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