## Microsoft Access to MobileDB Converter

### Contents

> Overview
> Creating New Conversion Settings
> Saving Conversion Settings
> Opening Conversion Settings
> Converting an Access Database to MobileDB
> Running the Conversion Automatically
> An example of the automatic process
> Other Notes
> Converting SQL database
> Reorganizing Fields
> Converting from MobileDB to Access
> Legal Stuff

###
Overview

This program is designed to allow the conversion of Microsoft Access tables into MobileDB for the PalmPilot. MobileDB is a powerful database system for the PalmPilot. For specific help regarding MobileDB, please see the MobileDB documentation or visit Mobile Generation Software at http://www.mobilegeneration.com.

Access to MobileDB allows you to save your settings so that you can easily recall them. Also, you can run Access to MobileDB in batch mode from the command-line, specifying which settings file to use. The program will then automatically open the MS Access database, select the correct table, perform the conversion based on your saved settings, and can have the newly created MobileDB database prepared to be uploaded to your PalmPilot at the next HotSync.
Go to Top

### Creating New Conversion Settings

When you first start the Access To MobileDB program, or when you select the File, New menu, all fields are cleared and you can create a new settings for a conversion.

To use Access To MobileDB, first select the Access Database. You can do this by clicking on the button next to the Access DB field, or by selecting the File, Select Access DB... menu.

The Tables and Queries in the database will be loaded into the Table (*Query) field and the first one in the list will be selected. All queries in the Access Database are prefixed with an asterisk to help you differentiate a query from a table. To select a different table or query, click on the down arrow directly to the right of the Table (*Query) field, and select a table or query from the drop-down list.

The list of fields in the selected table or query will be displayed in the Fields list. You can edit any field in this list by double-clicking on the field. The columns displayed are:

- Asterisk (*) - When there is an asterisk here, this field will be converted. If blank, this field will be skipped
- Access Field - This is the name of the field in the Access Database, it is not modifiable.
- MobileDB Field - This is the name that will be used for this particular field in the ModileDB database. The maximum length for a field is 24 characters
- Width - This is the width (in pixels) of the field when displayed in MobileDB. The minimum width is 10 pixels, the maximum width is 160.

The MobileDB field contains the path and filename of the MobileDB to create. When the conversion is started the Access records will be converted and placed here. You can select a new file location by clicking on the button next to the MobileDB field, or by selecting the File, Select MobileDB... menu.

The Name field is the name for the MobileDB database. By default, it is the same as the Access database name. You can change this by typing directly over this field. The maximum length for the MobileDB name is 20 characters.

The Auto Install checkbox selects whether you would like the newly created MobileDB database installed to the PalmPilot at the next HotSync. The box directly to the right of the Auto Install checkbox is the User Name to install. If you have multiple users in your Palm Desktop software, select the appropriate user for this database. The program selects the last used User Name by default.
Go to Top

### Saving Conversion Settings

To save your conversion settings, select the File, Save menu option. If this is a new conversion, you will be asked to provide a name for these settings. If this is an existing conversion, then your changes will be saved immediately.

To save your conversion settings to a file with a different name than the current settings, select the File, Save As... menu option.
Go to Top

### Opening Conversion Settings

To open previously saved conversion settings, select the File, Open menu option. You can then select the existing settings you wish to open.

The program will confirm that the Access database and table structure has changed since the last time you saved your settings. If there are changes, the program will try to adjust for those changes. If the program cannot make adjustments for the changes in the Access database structure, then it will not be able to open your settings, and you will need to recreate your settings. In any case, the program will notify you of the problem and let you know if it can continue or not. Note: You will only run into problems if the table structure (number of fields, name of fields, etc.) change, not if the data itself changes.

If the program cannot open you saved settings because of the changes in the Access database, then simply recreate your settings again and save it with the same settings file name.
Go to Top

### Converting an Access Database to MobileDB

Once you have set your settings for the conversion, click on the Convert To MobileDB button or select the File, Convert Access to MobileDB. The conversion process will start, and a progress bar will be displayed on the bottom of the window. Once the conversion is complete, you will be notified of how many records were converted.

If you selected Auto Install, then the newly create database is ready to be loaded to your PalmPilot at next HotSync. If you did not select Auto Install, then you must manually install the database using the Palm Desktop Install utility. Consult the Palm Desktop help for information on how to use the Install utility.

Remember that a large query may take a long time to run before returning the Access to MobileDB Converison program. During this time the progress bar will not move while the Access Database Engine is processing the query. During this time, the program may look like it is stuck or hung. If there is any disk activity, then most likely the program is working. Once the query is complete, the progress bar will start to move as records are processed.
Go to Top

### Running the Conversion Automatically

One of the best features of this program is that you can run a conversion from the command-line by just specifying the settings file to use. In other words, if you have a scheduler on your PC, you can have it run a conversion on a regular basis (daily, weekly, etc.) and have the new database automatically uploaded to your PalmPilot at next HotSync. For example, if you have a item database that has availability and pricing information, you can create a conversion for that file, then have a scheduler program run that conversion every night at, say, 2:00am. Then when you come in, in the morning, when you HotSync the new prices and availability will be loaded to your PalmPilot. This can be extremely useful if you need regular updates, but can live without real-time data.

If you do not have a scheduler, you could create a shortcut in your StartUp folder so that every time you boot your PC or login to a network, a new MobileDB database will be created and be ready for HotSync to your Palm Pilot.

To run a conversion automatically use the following syntax:

> Access2MDB.exe <settings file>

Where <settings file> is the location and filename of the settings file you wish to run. The default extension for a conversion settings file is .A2M. The default location is the same folder as the program is in. So for example, if the settings file is called example1.a2m and the program and the settings are both in
C:\Program Files\Access To MobileDB, you would use the following syntax:

> "C:\Program Files\Access To MobileDB\Access2mdb.exe" example1.a2m
> you need the quotes since there are spaces in the folder names

If the program is in C:\Program Files\Access To MobileDB and the settings file is in called example2.a2m and is stored in C:\My Documents, you would use the following syntax:

> "C:\Program Files\Access To MobileDB\Access2mdb.exe" "C:\My Documents\example2.a2m"
> you need the quotes because there are spaces in the folder names.

An example of the automatic process (assume that the program is in C:\Program Files\Access To MobileDB):

1. Create a new settings file, and test it to make sure it works as expected. Then save it (we'll use the settings name final.a2m and store it in the same location as the Access To MobileDB Program). Make sure that you have Auto Install checked.
2. Click on the Start button in Windows.
3. Click on run.
4. Enter: "c:\Program Files\Access To MobileDB\Access2MDB.exe" final.a2m and click the OK button.
5. The conversion will start in the background and you can continue doing other things.
6. A log file with the same file name will be created (final.log) in the same location as the settings file. This log file will tell you how the process went and, if successful, how many records were converted.
7. When the conversion is done, your MobileDB database is created and is ready for HotSyncing to your PalmPilot.

Go to Top

### Other Notes

Converting SQL databases
There was thought to provide the ability to convert SQL databases (Oracle, Informix, SQL Server, etc.) directly to MobileDB. Since, however, Microsoft Access has the ability to "link" other tables into its own tables, no process was created to directly access a SQL server. Instead, you can link any SQL tables you'd like into a Microsoft Access table, and then convert that table. You would still have the ability to convert the data in your SQL database without changing this program.
Reorganizing Fields
There is no way within the Access To MobileDB Converion program to reorganize the order of the fields. You can easily change what order you want fields to appear in, as well as perform many other functions, through the use of a Microsoft Access Query. Then you can select that query in Access To MobileDB and put your finishing touches on it.

Converting from MobileDB to Access
Since this program was written for personal use, this option was not provided since there was no need for this functionality. If you absolutely need to convert MobileDB databases to Access, use the MobileDB Converter program, available at Mobile Generation Software, that will allow you to save the MobileDB data in a comma-delimited text file. You can then import the text file into your Microsoft Access table using the import feature in Access.

Legal Stuff
This program is public domain, and as such there is no charge, whatsoever, for this program. You are free to use and modify this program as you feel necessary.
Go to Top