Page 315 - DCAP408_WEB_PROGRAMMING
P. 315

Unit 14: Database Connectivity




          Lines 10 through 25 first print out the table as it is initially. It then goes to the first record(line  Notes
          26), deletes it(line 27), and   prints out the new table (lines 31 through 39)

          Self Assessment

          Fill in the blanks:

          12.  While the lock is on no one can change the ……………………..
          13.  If the fieldlist parameter is an array, then valuelist must also be an ……………………..

          14.4 Building Database Application using ADO


          ActiveX Data Objects (ADO)

          The bridge between the data providers and data consumers is through data sources created using
          Microsoft ActiveX Data Objects (ADO), which is the primary method in Visual Basic to access data
          in any data source, both relational and non-relational. For backward compatibility and project
          maintenance, Remote Data Objects (RDO) and Data Access Objects (DAO) are still supported.

          Data Sources and Data Controls

          On the client side, several new data sources are available, including the Data Environment, a
          graphical designer that allows you to quickly create ADO Connections and Commands to access
          your data. The Data Environment designer provides a dynamic programmatic interface to the
          data access objects in your project. In addition, the Data Environment provides advanced data
          shaping services — the ability to create hierarchies of related data, aggregates, and automatic
          groupings, all without code.
          The  new ADO Data control is similar to the intrinsic data control and Remote Data control,
          except that it uses ADO to access data. You can now use an ADO Recordset as a data source for
          your controls and objects in Visual Basic.
          In Visual Basic you can now create your own data sources either as user controls or classes, to
          encapsulate business rules or proprietary data structures. The class module now features the
          DataSourceBehavior property and the GetDataMember event, which allow you to configure a
          class as a data source.

          Dynamic Data Binding

          The ability to dynamically bind a data source to a data consumer is now possible in Visual Basic.
          At run time, you can now set the DataSource property of a data consumer (such as the DataGrid
          control) to a data source (such as the ADO Data control).




             Notes  This  capability, unavailable in previous versions of Visual Basic,  allows you to
             create applications, which can access a multitude of data sources.

          Presenting Data to the End User

          Visual Basic offers a variety of rich ways to present data to your end users. ADO/OLE DB-based
          versions of all the data bound controls are included in Visual Basic:




                                           LOVELY PROFESSIONAL UNIVERSITY                                   309
   310   311   312   313   314   315   316   317   318   319   320