`
`484 Programmer’s Guide
`
`Defining a Database
`
`Visual Basic uses a specific set of data access objects to define or describe the
`database, tables, fields and records you work with. Figure 20.3 illustrates the
`database design of Visual Basic databases. All databases, regardless of their
`internal structure, will be expressed in terms of this design.
`
`Database
`
`
`
`Fields Collection
`
`Indexes Collection
`
`.;
`
` TableDefs Collection
`
`.
`
`l
`
`III-I-II-I lIII-III..-
`
`Figure 20.3 Visual Basic Database Structure
`
`The Database Object
`The data control’s Database property can be represented by a Database object
`that describes the current database. It maintains information about the name of the
`
`database and its structure. For example, the database structure describes the tables
`in the database and the fields in each table. The Database object also supports
`several Visual Basic methods that you can use to manage the database.
`
`Microsoft Corp. Exhibit 1104 Page 497
`
`Enfish, LLC; |PR2014-00574
`Exhibit 2206
`
`Page 1 of 2
`
`
`
`Enfish, LLC; IPR2014-00574
`Exhibit 2206
`Page 1 of 2
`
`
`
`
`
`Chapter 20 Accessing Databases with the Data Control
`
`485
`
`Collections
`
`A collection is a set of related objects. The objects in a collection are referred to
`as members of the collection. In Visual Basic, each member of a collection has a
`unique name so it’s easy to identify. You can use the Count property to determine
`the number of members in a collection. Collections are managed like the items in
`a list box. Each member of the collection can also be referenced by its number,
`which starts with 0.
`
`For example, to print the names of tables in your database you can examine the
`TableDefs collection:
`
`Dim I As Integer
`For
`I = B To Datal.Database.TableDefs.Count
`Print Datal.Database.TableDefs(I).Name
`I
`
`Next
`
`-
`
`1
`
`Note In the Visual Basic Standard Edition, the data control can be used to open
`only existing database objects. The OpenDatabaSe function and the ability to
`Dim other database objects (like TableDefs, Fields, Indexes, Dynaset, and
`Snapshot) is not supported. Because of this, you cannot create new databases or
`modify existing database structures using Visual Basic procedures and data
`objects in the Standard Edition.
`
`However, you will be able to create databases, tables, and indexes using the
`Visual Basic Data Manager application (supplied with Visual Basic) or other
`database administration applications designed to work with your specific
`database. In the Visual Basic Professional Edition, you will be able to create and
`modify database structures.
`
`TableDef Objects and TableDefs Collection
`Because a database can have several tables, and tables can have several fields,
`Visual Basic groups the definitions for these objects in collections.
`
`A Database object can have one or many tables. The description of each table is
`maintained in a TableDef object (shown in Figure 20.4).
`
`
`
`Microsoft Corp. Exhibit 1104 Page 498
`
`Enfish, LLC; |PR2014-00574
`Exhibit 2206
`
`Page 2 of 2
`
`Enfish, LLC; IPR2014-00574
`Exhibit 2206
`Page 2 of 2
`
`