Page 285 - Open Soource Technologies 304.indd
P. 285
Unit 13: Working With Reports
• Discuss date source and data control
• Understand dynamic data binding
• Discuss data formatting and data validation
• Explain creating various type of data
• Discuss data environment report using grid
• Explain data environment report using data bound control
Introduction
Visual Basic 6 provides you with a data report designer to create your report, it is somewhat
similar to data report designer in Microsoft Access. The data report designer has its own set of
controls which allow you to customize your report seamlessly.
13.1 Data Environment
The data environment is a repository in your Visual InterDev Web project for the information
required in server script to connect and manipulate data in databases. It provides a standard
interface for creating re-usable data-related objects and for placing them on Web pages.
The data environment is available on the server. If you are designing a Web
application that uses client access to data (using Internet Explorer 4.0 DHTML),
the data environment is available at design time, but not used at run time.
The data environment also provides an object you can reference in script, allowing you to access
and manage database objects such as tables, views, stored procedures, and SQL commands
programmatically. It provides an easy-to-use wrapper around ActiveX Data Objects (ADO),
making these objects more accessible and easier to work with in Visual InterDev.
To understand the data environment, you must understand these concepts:
• Data Environment Contents
• Drag and Drop Scenarios in the Data Environment
• The Data Environment Object Model
13.1.1 Data Environment Contents
The primary component of the data environment is a data connection, which includes the
information required to connect to one database with a specific user name. For example, your
data environment might include a connection that links your application to the Pubs database
on a SQL Server under the user names Admin (at design time) and Guest (at run time). If your
application requires access to multiple databases, you can add multiple data connections to your
data environment.
Within each data connection, you can add one or more data commands (command objects), which
define a set of data to work with. Command objects can reference a database object such as a
table, query, view, synonym, stored procedure, or SQL statement. For example, you might create
a command object that references the Authors table so you can display the contents of that table
on a Web page. You could also define additional command objects to reference queries and stored
procedures you can call to display and update data in other tables.
LOVELY PROFESSIONAL UNIVERSITY 279