Import Database

The database import menu item is for selecting options for the import database. If ODBC database has been
enabled (uncheck ‘Disable ODBC database connection’ option) then RASTRAC will read/write vehicle settings
to most standard ODBC database (e.g. Microsoft SQL, Microsoft Access, Oracle) - instead of the vehicle.ini file.
You will be able to connect, disconnect, disable, select, and define a new ODBC database
connection using the database inport interface. Press the ‘Disconnect From Database’ button
to disconnect from the selected database and discontinue database use.
Press the ‘Connect To Database’ to connect the selected ODBC database (if not already connected).
Select the ‘Disable ODBC database connection to disconnect from the database (if
connected) and disable connections from happening in the future (unless unchecked).
This allows you to temporarily disable the database without deleting it from RASTRAC.
Press the ‘Select Database’ button to select an existing ODBC database for RASTRAC to connect to.
Press the ‘New Database’ button if you want to define a new ODBC database connection.
The ODBC database table is similar to the vehicle settings (vehicle.ini) and points settings (point.ini)
except that it is in the native ODBC format and not in standard ASCII text format. RASTRAC will read
and write vehicle settings and point settings to/from the ODBC database table whenever the settings are used.
An ODBC database interface (such as Microsoft Access) will be needed to view or access the RASTRAC database
table from outside of RASTRAC. The ODBC database table for vehicles is created using the user name and
'_VEHICLES' extension and points use '_POINTS' extension (e.g. default user tables would be DEFAULT_VEHICLES
and DEFAULT_POINTS). Vehicle and points will be stored in different tables for each user.
Having an ODBC database allows you to manage a large number of vehicles or points easier than storing them in
a settings file (*.ini). Also, if another application needs to make modifications to the settings table outside
of the RASTRAC program, then you will need to use the import database. Only use the import database if an
outside application needs to change vehicle or point settings or if you have lots of vehicle or points defined
(e.g. more than 1000).
Check the 'Automatically Check the Import Database for External Updates' option if another application is going
to update either the vehicle or point tables in the database. Whenever an outside application modifies one of the
tables, the column named 'UPDATED' needs to be changed from a 0 (or NULL) to a 1 indicating that the record was
updated. RASTRAC will automatically check the database every second and load the changes made by the other
application. When the modified record is loaded, the 'UPDATED' column is changed back to a 0 by RASTRAC.
Set this option only if another application outside of RASTRAC will modify the import
database vehicle and point setting tables.
Click the 'Export (create vehicle.ini and port.ini files)' button to export all of the vehicle and point settings from
the database to vehilce.ini and point.ini files. You can create backup files of your points and vehicles by using this
feature. If a vehicle.ini or point.ini file already exists in your users folder, then a copy of that file will be created
(e.g. C:\Rtmx\Users\Default\Backup_Vehicle.ini or C:\Program Files\RASTRAC\Users\Default\Backup_Vehicle.ini or Backup_Point.ini).
Warning: Older operating systems (98, 95, etc...)
have limitations on ini file sizes (64KB max file size). If you have a large number of points or vehicles, it is
possible that the file may be truncated to 64KB and some of your settings may not be saved to the ini file (if you have
a file size limit and too much data to store).
ODBC database setup example for Microsoft Access:
- Go to Tools...Database...Import...
- Click the 'New Database' button.
- Under "Select a type of data source" make sure ‘File Data Source
(Machine independent)’ is selected and click "Next".

- Click on ‘Microsoft Access Driver (*.mdb)’ and then click "Next".

- The Data Source on the next screen should be "RASTRAC Import Database". Click
"Next".

- The next screen should show:

Click "Finish".
- On the next screen titled "ODBC Microsoft Access Setup", click "Create" in
the "Database" section.

- In the "Database Name" box type in "Settings.mdb".
Make sure that "C:\Rtmx" or "C:\Program Files\RASTRAC" is
selected (or the path to where you want the RASTRAC import database to be located).
In the "Format" section choose the version of
Microsoft Access that you have (if you cannot open the database with
Access after RASTRAC has written data, you may have selected an invalid version for the driver -
Access 97 uses version 3.x on a computer we tested but the driver can also do
versions 2.x or 4.x). Click "OK".

- Click "OK" in the "ODBC Microsooft Access Setup" window.
- A RASTRAC Advisory will appear saying "A new database has been created. Please select
the database from the list if you wish to connect to". Click "OK".
- The "Select Data Source" window will appear. Click "RASTRAC Import Database.dsn"
in the list and then click "OK".

- The "ODBC Database Settings" window should now have "Connected to the
selected database", "Connected to the vehicle settings database table", and
"Connected to the point settings database table" selected.
- Click "Close". All vehicle and point settings will now be stored in
database "C:\Rtmx\Settings.mdb" or "C:\Program Files\RASTRAC\Settings.mdb".
Note: Access our Knowledge Base support on the Internet at http://www.rastrac.com/ for the latest
information on connecting to ODBC databases (including Microsoft SQL and Oracle).