Official website for Linux User & Developer
24 Base – No Frills Document Management

by Dmitri Popov

A no-frills personal document management system can come in handy in many situations. Read on to find out how Base can really come into its own…

This article originally appeared in issue 91 of Linux User & Developer Base - No Frills Document Management Subscribe and save more than 30% and receive our exclusive money back guarantee – click here to find out more.

Document management systems (DMS) are not necessarily reserved for companies with complex workflows and thousands of documents. A no-frills personal DMS can come in handy in many situations. You can use it to organise your research materials, or manage article submissions. While there are a few open source DMSes out there, most are geared towards companies who need to manage their complicated document workflow. Also, most DMSes are server-based applications which require some skill to deploy and maintain.

But why not build your own little desktop document management solution? After all, Base is a rather capable tool for creating databases, and the Basic built-in scripting language can help to add some nifty features to your database applications. Like the idea but don’t know where to start? No problem: this tutorial will guide you through the process of creating a simple document management database and adding a couple of useful features to it with
Basic macros.

The first order of business is, of course, to create a new database. Fire up the Base application, and use the Database Wizard to create a new database. When prompted, tick the ‘Yes, register the database for me’ checkbox to register the created database as a data source. Press Finish to save the database under the DocMaBase name (or any other name you like) and open it for editing.

The next step is to add a table and populate it with fields. Switch to the Tables section and click on the ‘Create Table in Design View’ link. Which fields to add to the table depend largely on what information you want to store in the database. In our case, we add the following fields: ID (a numeric primary key), Title (the document’s title), DateAdded (record creation date), Notes (miscellaneous notes), Status (document’s status, eg In Progress, Archived etc), FileName (name of the attached document) and FileObj (a binary field for storing documents). Once the table is ready, give it a name (eg ‘documents’) and save it.

We now need to create a form which will act as a graphical front-end to the data stored in the ‘documents’ table. To create a new form, switch to the Forms section and click on the ‘Create Form in Design View’ link. Creating a form using the Form Designer is rather straightforward. All you have to do is to add the fields you want to the form, then specify their properties. There are, however, a couple of things that require some additional work. Since the Status field is used to store the status of the document, it is most likely to contain only a handful of unique items (In Progress, Proofread, Archived and so on).

So instead of typing the same status every time you create a new record, you can add a combo box which lets you simply select the desired item from the list. To do this, choose the Combo Box control in the Form Controls toolbar and draw a box in the form. This opens the Combo Box Wizard which helps you to configure the created combo box. By default, the created combo box is empty, so you have to enter the name of the status you want. Once you’ve done that, the entry is saved in the database and it appears in the combo box.

The key feature of the document management solution is the ability to store documents and files in the database itself. To add this feature, you need two form elements: a file selection field and buttons to import and export the selected file. The buttons are used to trigger Basic macros that insert the selected file into the FileObj field and save the file in the specified directory on the hard disk.

Proceed to page 2…

Click here for more tutorials from Linux User & Developer

twitter follow us
Pages: 1 2
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.
    • Pingback:

    • chessboxing

      Is it really necessary to let viewers click 2 times to view the screenshot large?
      Nonetheless, thanks for the article. I always enjoy this blog/website.

    • Andreas Moroder


      what about to publish a link to the complete code ?


    • Lars

      I am a little lost here… :(
      I downloaded the 3.2.1 oo dvd, but cannot find the archive.
      Can someone pinpoint me to the place of the file on the dvd or send me a link to some place on the web?
      Thanks a lot in advance.

    • Philip

      Thanks for an interesting article. I’d like to give it a try but … WHAT DVD? You say the code is available as an OpenOffice Basic library on the DVD but I can find no hint about what DVD you’re talking about or where on the DVD to look.

      Can you help?

    • Feng

      it is in a magazine “Linux User and Developer”

    • Pingback: Need a file-based tagging file organizer()

    • Too many folks have already thrown away
      plenty of good money on nothing but useless salt tablets
      being shipped from South America. Vitamin B3 or also called as Niacin is
      important in weight loss because it is responsible for the regulation of thyroid hormones and also in sugar levels in the body.
      Do not be tempted to lose weight as quickly as you can, because a crash diet will have you eating less than a thousand calories a day slowing down your metabolism.

    • david pellecchia

      Just come across this article. Very Nice. Getting to grips with MySql and this strikes me as a nice little application. Any chance of re-publishing the macro?