ADO/DAO Mix

Speaker Notes

Slide 1:

This presentation gives more examples of ADO and DAO and also introduces the Visual Data Manager.

Slide 2:

This slide shows that the data is in two different kinds of grids - one is the flex grid with the DAO and the other is the grid with the ADO. The file is in Access 97 and has two indexes in addition to a prime key. The green arrows point to the things associated with DAO and the purple arrows point to the thing associated with the ADO.

Slide 3:

This shows the indexes associated with the tree table in the InvenTre database.

Note that you can create these indexes by giving them a name (I used the field name), putting the name of the field as shown in the definition of the table under field name. Ascending is the default sort order.

Slide 4:

Note that in the ADO, I called the control ADOTree and in the DAO, I called the control datTree. The order by clause in this code puts the records in the specified order.

Slide 5:

I picked Tree - Name as the order and did both Process to handle the grid at the top and Process ADO to handle the grid at the bottom.

Slide 6:

First go to Add-Ins and then select Visual Data Manager. Select Open DataBase and then MicrosoftAccess. The usual file selection screen will come up. I selected InvenTre on the A drive.

Slide 7:

I double clicked on the Tree table to see the display of records.

Note that When I click on the + next to Tree I get the option of seeing fields, properties and indexes. In this example I then clicked on the + next to fields to see the field names. To see the indexes, I could have clicked on indexes.

Slide 8:

Note that you can add and remove indexes and examine properties of fields etc on this table structure.

Slide 9:

This shows the two grids and two controls. The choice is to test a field for greater than, less than or equal to.

Slide 10:

Note the wrap in the SQL code does not appear in the program. It is done here to fit the slide.

Slide 11:

Note that the Select statements do not wrap in the real code. Done here to show!

Slide 12:

Both Process and Process ADO were clicked on to produce this result. Note that the comparison is to all names greater than Elm.