Page 286 - Open Soource Technologies 304.indd
P. 286

Event Driven Programming



                          Command objects are accessible to any page in your application. They therefore become reusable
                          objects. If the underlying database changes, you can make a single change to the command object,
                          and all Web pages that reference the command object will continue to work properly.
                          Each command object is a node that contains additional information relating to that command
                          object. For example, a command object that references a table contains a list of columns in that
                          table. A command object that references a stored procedure can contain a list of the columns
                          returned by the procedure, or it can contain a list of the procedure’s parameters. For information
                          on adding Command objects, see Getting Records and Visual InterDev creates a data environment
                          for your project the first time you define a data connection. As soon as you add the connection,
                          Visual InterDev creates the Data Environment folder and adds it as a node under the Global.asa
                          file. The data connection you added is displayed in the Data Environment node.
                          As you create additional data connections, they are added to the Data Environment node.


































                                  Figure 13.1: A Web Project Showing the Data Environment and Data Commands.


                                        You can only have one Data Environment node (and one data environment)
                                        in a Visual InterDev project.



                          13.1.2 Drag and Drop Scenarios in the Data Environment
                          An important feature of the data environment is that you can drag objects to and from it to
                          simplify the process of adding database access to your application. To create new commands, you
                          can drag database objects from the Data View window to the data environment.



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