Databases - A Beginners Guide
Welcome to the exciting world of database development! In this series of articles, I will introduce you to databases, and explain how to use them in your applications.
What are databases? Well the easy answer to this is that they are somewhere to store data. However they can do much more than this. I am going to begin at the very basics, which is were I was not so long ago. I will try to point you towards some good books, but the best free reference is found in the VB online help. Although you may get away with using the Learning or Standard edition, you will probably need the Professional or Enterprise Edition to use the data objects which we will be looking at later on.
Before we start looking at how to use databases in VB, we will have a look at their structure. The data is held in tables, stored within the database. Each table is divided up into columns, called fields, and rows, called records. In VB talk, tables are called RecordSets (ie. a set of records). For now, this is all the information you need to know, although later on in the article I will explain in more detail how the recordsets, tables and fields work together.
There are several ways that VB can access databases. The one that we will be using for now is DAO (Data Access Objects), but there is also RDO, ADO, and OBDC. DAO is the oldest form of data access engine, and is also the most popular. Microsoft estimates that over 75% of all professional Visual Basic applications use DAO! The reason for this high statistic stems from the ease that a simple database application can be created using the Data Control and built in VB commands.
Page 1 of 2