Developing a Database Application:
The dB2K Tutorial

Ken Mayer, Senior SQA Engineer, dBASE Inc.
Michael Nuwer, dB2K user
Last Modified: October 13, 2001
Version 2.2.0

Phase X
Closing Comments


After everything we've done, we have some settings in the dB2K.INI file that we may not want to leave around.

These settings have to do specifically with the custom forms and custom reports.

The next time you go to create a form or report, dB2K is going to assume you want to use the custom one in the tutorial directory that you last used. You may want to solve that NOW by doing the following:

Repeat the above for a report, or you will run into the same issue there.

This will save you some frustration when you next go to create a new application.

One other thing you should do is to type, at the command window:


This will ensure that the tutorial database is closed, and that the next time you go to create tables you don't accidentally save them to that location ...

Finally, you may wish to remove the BDE Aliases we created in the BDE Administrator, unless you wish to tinker with the tutorial a bit more. You can delete them easily enough by bringing the BDE Administrator up, clicking on the alias you wish to delete, and selecting the "Object" menu, and so on. There are two aliases that may exist -- if you downloaded the working application you will find "dB2KTutfinal" as a BDE alias, and there is the "dB2KTutorial" alias we created for the project. If you need to re-create them, you can find the information necessary in the Phase II of this tutorial.

What Have We Learned?

First we have learned that dB2K is a powerful software package and object oriented programming is it's foundation. We learned about classes, properties and events.

Next, we learned about Re-Usability! That is what all that stuff with custom datamodules, custom forms, custom controls, and custom reports is about. You should always try to use these, and try to design any code that you place in your custom objects so that it is as generic or re-usable as possible. We learned about (although these terms weren't used) inheritance, polymorphism, and encapsulation.

We learned how to create an MDI application that works like most other data driven applications.

We learned how to create BDE Aliases and use them as databases.

We created some parent/child relationships among our query objects (in the datamodules). We created forms that showed these relationships as well as reports that used them.

We used datamodules in forms and reports, and in one case the same datamodule was used in both a form and a report.

We created forms with sub-forms (dialog forms, children forms, whatever you want to call them).

We created reports with groups, with totals, and more.

In the process we learned something about how the Object-Oriented Database Manipulation Language (OODML) is used, and created code to manipulate data using it.

We created an executable that we then set up to deploy to another user's system.

And we learned about how flexible and powerful dB2K can really be.

Believe it or not, we really only scratched the surface of the abilities of dB2K with this tutorial. While we sometimes scratched fairly deeply, there's a lot more going on under the hood. There are objects in dB2K we haven't touched. We didn't write any code that was independant of forms and reports to manipulate data. We didn't use any ActiveX controls, OLE abilities, and so on.

When it comes right down to it, every time I use dB2K to write a new application I learn more about what it can do. So will you ...

Now What?

You should get used to the following misc. bits of information (provided in no particular sequence [basically the sequence I thought of them ...]):

Note: You are hereby granted full permission to use any or all of the code in this tutorial for any application you write. If the code is in the .CC (Custom Control) files or the Preview.wfm, please make sure you credit the authors, and if the code comes from instructions in the tutorial, assume the authors to be either Gary White, Peter Rorlick, Ken Mayer or a combination of the three ...

Ok, We're Really Done

With luck, you learned something about creating applications in dB2K.

I know that the process of creating this tutorial has caused me to stretch my own knowledge, and in some cases I have actually changed some of my own development techniques based on what I learned in building this project for you.

After you get over the learning curve, you will find that development in this product is largely enjoyable process. Enjoy it, and maybe I'll see you out in the newsgroups!

Go back to the tutorial menu

The Legal Stuff: This document is part of the dB2K Tutorial created by Ken Mayer. This material is copyright © 2001, by Ken Mayer. dB2K is copyrighted, trademarked, etc., by dBASE, Inc., the BDE (Borland Database Engine) and BDE Administrator are copyrighted, trademarked and all that by Borland, International. This document may not be posted elsewhere without the explicit permission of the author, who retains all rights to the document.