Visual Data Manager

What Is the Visual Basic 6 Data Manager?

The Visual Basic 6 Data Manager is a complete program (written in Visual Basic!) that ships with Visual Basic 6.0. This program can be used to create new Microsoft Access databases and edit, convert, compact, repair, encrypt, and decrypt existing databases. You can use Data Manager to create or delete data tables and indexes. You can also use the Visual Basic 6 Data Manager to perform simple data entry on data tables.
The Visual Basic 6 Data Manager can create databases in the Microsoft Access database format. It can also be used to attach to and perform field maintenance and data entry on Paradox, dBASE, FoxPro, Btrieve, and ODBC data sources. It can even attach to Excel spreadsheets and DOS Text files.

Using the Data Manager

Today you will learn how to use the Data Manager that is shipped with Visual Basic 6. This utility program gives you the power to create and maintain basic databases without leaving Visual Basic 6 design mode. You will learn how to use the Data Manager program to do the following:
  • Create a new database
  • Open existing databases
  • Add data tables to a database
  • Link to information contained in other databases
  • Add fields and indexes to a database
  • Set relationships between data tables
  • Enter and find data in data tables
  • Enter and save SQL statements
  • Compact and repair databases
  • Encrypt and decrypt databases
Plus, today is the day you start building your first extended Visual Basic 6 database project—The Company Database Project. You will use the Data Manager to construct the first data table in the database—the CompanyMaster table.

Microsoft Access Database Support

The Visual Basic 6 Data Manager provides nearly complete support for Microsoft Access databases. It allows you to create databases and create and delete tables, indexes, and data fields. You will not, however, be able to delete data fields that are used in indexes.

Advantages and Disadvantages of Using the Data Manager

  • The Data Manager program has several key features that make it an excellent tool for constructing and maintaining databases for your Visual Basic 6 applications. First, you can launch this program directly from the Visual Basic 6 Add-Ins menu. As long as Visual Basic 6 is up and running in design mode, you can call up the Data Manager and create new databases, open existing databases, or modify data tables and indexes without having to leave Visual Basic 6 or close down your Visual Basic 6 project.

  • Another advantage of having the Data Manager is that you can use it to do quick data entry into existing data tables. This allows you to quickly create test data for your Visual Basic 6 applications. Do you need to see whether a database lookup routine you wrote really works? You can pop up the Data Manager add a few records to the appropriate data table, and then return to Visual Basic 6 and run your application.

  • You can also use the Data Manager to compact out deleted records (in other words, physically remove spaces left by deleted records), and for those occasions when you get the dreaded "corrupted database" error, you can use the Data Manager to repair existing Microsoft Access type databases.

  • You can even use Data Manager to build and test SQL statements. This is an extremely handy tool to have in order to test the logic of SQL statements as you need to incorporate them into your Visual Basic 6 code. These statements, once tested and working properly, can then be saved by Data Manager.

  • A major disadvantage of using the Data Manager to create databases for your Visual Basic 6 applications is that it is not a complete database administration tool. Although you can use the Data Manager to construct and maintain data tables and indexes, you cannot print out data structures or index parameters.

  • Even with this limitation, the Data Manager is a very useful tool. Let's go through a short course on how to use the Data Manager to construct and maintain Microsoft Access-type databases.