Sams Teach Yourself Visual Basic 6 in 24 Hours

Sams Teach Yourself Visual Basic 6 in 24 Hours

By Greg Perry

Q&A

  1. What if I don't have a database?

    If you don't have a database and if you don't see a need for one, you might not need the Data control. You can perhaps get by with the file-related statements in Visual Basic's language such as Write # and Input #. If you feel adventurous, check out VB's Add-Ins | Visual Data Manager. This add-in application gives you the ability to use Visual Basic to design, create, and analyze database files in several formats even if you don't have a database program available. Although the Visual Data Manager doesn't take the place of a full-functioned database management system such as Microsoft Access, you can begin using the Data control to access a database that you create with the Visual Data Manager.

  2. What if I don't know the fields or tables in my database?

    If you write an application that manages and updates a database that you did not create and with which you are not familiar, you can still use Visual Basic because the Data control and bound controls are able to interpret most database formats. Therefore, when you select a database for the Data control, the Data control will display a list of tables from that database when you open the Data control's RecordSource drop-down list box. In addition, any bound controls, such as text boxes or labels, that you connect to the Data control will display an available list of fields that you want to bind to those controls.

Share ThisShare This

Informit Network