Getting started
Quick Start
- Start Visual Basic 6 Professional or VB6 Enterprise
(If you're using VB5 or VB6 Learning please see the NWPlain.vbp
example. You may write us at
service@blueshell.com to get a template for using bAt without
DataEnvironment)
- The dialog New Project appears. Select blueshell Active Tables
Project and press Open.
- A new project named blueshellActiveTablesProject with a Form, a
DataEnvironment and a related Readme file opens. In the Project Explorer open
the Related Documents node, double-click bAt Readme.htm and follow the
instructions.
Details
There are mainly three levels of objects a database applications deals with:
connections, tables and fields. A connection refers to a database (MS Access *.mdb
file, SQL Server database, Oracle database etc.). A database contains some
tables and a table divides into some fields (also called columns). ADO uses
objects called Connection, Recordset and Field to represent these tree levels.
You are using these ADO objects to access the database at code level. A user
needs a graphical interface to access the database. blueshell Active Tables
delivers the components used to build such an interface.
Connections, Recordsets and Fields in bAt
DataEnvironment hosting the connection(s) and tables
In Visual Basic 6 you should use a DataEnvironment to host your connection(s).
See the Visual Basic documentation for details, here are the main steps:
- Add a DataEnvironment to your project
- Access the properties of a connection in the DataEnvironment and
- Pick up a suitable OLEDB provider
- Provide all the information VB needs to access the connection
- Add tables as needed:
- Select the connection
- Click "Add command"
- Access the properties of the command and select the table
atb Control representing a table
With bAt you are using an atb control to
represent a table.
- Add a new form to your project.
- Add an atb control from the toolbox to the form. Now your screen looks like
this:
- Now click the atb control in order to select it and press F4 to
view the properties window.
- In the properties window scroll to DataSource and select your
DataEnvironment from the drop down list.
- Use the drop down list of DataMember to select a table.
atb's column objects representing the fields
Each atb control has a set of column objects to represent the fields.
- Right click on the atb control and pick Properties from the
context menu to access atb's property pages.
- At the property page Columns press the Complete button to
add a column for each field of the table. Now your screen should look like
this:
- Press the OK button of the Property pages.
Now you may compile and start your application. You may access your table
through the form and the atb control showing a grid. Up to here it's what all
the other grids in the world can do, too.