By Todd Ogasawara, August 20,
2001
Copyright 2002 Todd Ogasawara
Data in HanDBase databases can be used by almost any application by using the
HanDBase Desktop application. You can find the basics of the procedure here.
HanDBase Desktop companion application (bundled with HanDBase for the Pocket PC)
When importing data from a desktop database or spreadsheet, you must make certain that the data conforms to HanDBase’s limitations of a maximum of 30 fields per record and a maximum of 65,000 records in a database.
English (and others if applicable)
The HanDBase database package for the Pocket PC includes the HanDBase Desktop application that runs on desktop and notebook PCs running the various versions of Microsoft® Windows®. You can get an idea of what the HanDBase Desktop application looks like in Figure 1. In general, it works exactly like the Pocket PC version except for its ability to present more information because of the larger window size.
However, there are two important options in the File menu that lets you use your HanDBase databases in all kinds of interesting ways. These two options are Export and Import.
Figure 1. HanDBase Desktop application. |
Figure 2 shows you the five export types available:
Figure 2. File export options. |
The Comma Separated File format is the one you would use to import into an application like Microsoft Access. I found that the only option I needed to check was Create First Line with Field Names (see Figure 3). Microsoft Access has a matching option that correctly labels its record fields using your HanDBase field names. Text and number fields are detected and set automatically. However, Date fields need to be specifically defined. And, you will find that errors may be noted during the import process if date fields were not specifically filled in and left with the default NO DATE entry. You can, however, ignore this message since correct filled date fields are imported correctly.
Figure 3. Comma Separated File export options. |
The Microsoft Excel and Microsoft Word export options create spreadsheets and document tables as expected. However, you will probably want to modify spreadsheet and document table formats for aesthetic reasons.
The Web Page export option presents you with its own set of export options. You can, however, create an acceptable looking Web table using the default settings. You can also preview the Web version of the HanDBase table before actually creating an .html file.
The XML export option is the one I personally use a lot. XML is an acronym for eXtensible Markup Language. XML provides a way to specify data structures. And, specifically, it is a way to deliver structured content over the Web between two possibility dissimilar applications. I use it update some of the Web pages on my personal MobileViews.com Web site. You can see a very simple application that uses XML and a bit of JavaScript to create my Pocket PC Applications List. You can find a more complex example of using XML in my Daily Commentary page.
In both cases, the information you see in the Web pages is entered into HanDBase on my Pocket PC. This data is transformed into XML data structures, which are, in turn, interpreted and formatted by a JavaScript program. Note that the images on my Daily Commentary page are not stored in HanDBase. However, the image files names are. These image file names are dealt with by my JavaScript program.
Only the Comma Separated Values file format can be imported. However, most applications (Microsoft Access, Excel, and Word for example) can produce this nearly universally accepted file transfer file format. Microsoft Access and Excel can produce this file type using their Save As options. You can translate tables in Microsoft Word to a .csv format by using the following procedure:
Figures 4 and 5 show the various file import options. Again, it is a good idea to specify exporting with Field Names in the First Line in the exporting application.
Figure 4. Import options to control how data is brought into a database. |
Figure 5. Import file information options. |
The HanDBase Desktop application Export and Import options lets you use HanDBase with a wide variety of applications you probably use every day on your desktop or notebook PC. Finding the right combination of application interfaces can increase your productivity immensely.