|RTL Reference|Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back|
Well, we have all been working with Paradox/DBbase tables. One of the things that really annoy me while developing database application are those famous "VAL file out of date" errors. The other problem is distributing an application that has more than one version; I think of structure updates to tables (adding, modifying or renaming fields). After a few sleepless nights, I started to wonder wouldn't it be fabulous to have some tool, that could create db, mb, px, val, x??, y??, dbf, mdx, dbt on the fly. If that software could also fix corrupted tables, and even pack them then I'll be "saved". Naturally web was the first place to start looking...
If you have ever experienced same problems, I got the software for you. The one that is really a great relief.
What's this all about...
Table Scanner is a Object Pascal source code generator. It is designed to add table maintenance routines to your Delphi (1/2/3/4) application. Following features are easily imported to any Delphi database application:
- First time the application is run non-existent tables are automatically created.
- Non-existent indexes, validations checks or referential integrities constraints are also automatically crated.
- Tables are checked for errors every time the application is run and any damaged indexes, validations checks or referential integrities constraints are automatically fixed.
- Any modifications to table names, field layout, indexes, validations checks or referential integrities constraints are automatically applied to tables on disk the first time the modifications are detected.
Two most important files in Table Scanner software package are: Scanner.exe (the source code generator) and TblScn.dll (core table handling routines for Delphi projects used to create, check, pack and restructure tables).
Make my day or Just One Line of Code...
With the use of Borland Database Engine (BDE), Table Scanner and its companion DLL, we can really enhance our database applications.
There are two main steps when working with Table Scanner. First, you have to build your source code with Scanner.exe, second put just one line of code in your project. Working with code generator is incredibly easy. Pick tables that need to be distributed with your application, push a single button, save generated code, and you are ready to move on.
Generated code (pas unit) contains one public procedure that can be called directly through your application.
Not to forget, you have to put source code unit, usually MakeDB.pas, to the Uses clause of the project main form. Now, everything we have to write down is (in the main form OnCreate event):
We are now ready to distribute our application.
Files that always have to be distributed:
1. The application executable file;
2. Borland Database Engine (BDE);
Files that never have to be distributed: auxiliary files (px, val, x??, y??, mdx)
Files that may have to be distributed: data files (db, mb, dbf, dbt).
What can't we do...
There are some restrictions to TableScanner. One of the most important that I miss: corrupted Data files (*.db and *.mb) cannot be fixed by TblScn.dll at run-time. But this is maybe too much to ask. Some other restrictions are (mostly) linked to BDE limitations.
Some more database related tools:
- TUtility Components, Paradox table verify & repair components. From Out & About Productions.
All graphics in this feature created by Zarko Gajic.
|· Learn another routine every day - RTL Quick Reference.
· Download free source code applications and components.
· Talk about Delphi Programming, real time.
· Link to the Delphi Programming site from your Web pages.
· Tutorials, articles, tech. tips by date: 2001|2000|1999|1998 or by TOPIC.
|· NEXT ARTICLE: BACK me UP!.
Review of TBackupFile, a small backup and restore component for Delphi.
|Stay informed with all new and interesting things about Delphi (for free).|
|Got some code to share? Got a question? Need some help?|