Setting up ODBC on Mac OS X. 

Mapping out the database structure, importing the data and writing the software were simple compared to setting up a Mac to read data directly from the K4 database. I was able to work out this first step of the project with some help from Managing Editor, Inc.

  1. Download iODBC Driver Manager, Administrator, SDK.The iODBC Driver Manager is more capable than the ODBC included with Mac OS X and it’s free. It can be downloaded from This driver dates back to Feb 2006 and requires Mac OS X 10.3.9 or later. I have successfully used it with Mac OS X 10.4.x and 10.5.x.
  2. Open the downloaded disk image file, muo3czzz.dmgand then run the installer in the disk image, OpenLink-GenericClient.mpkg.
  3. Download the PrimeBase_ODBC driver from You will need to setup an account on the site. I installed version 4282 of the PrimeBase ODBC Driver 4.2 to connect to a K4 5.91 database. Note that there are both Intel and PPC versions. 
  4. Copy the downloaded file to the installation drive and then decompress it. Keep a copy of the compressed file in case you need to attempt another installation. Since this is a .tar.gz file you just can just double-click on it to decompress it.
  5. Open Terminal and make the installer’s directory the current directory. In my case I entered cd /Users/paulchernoff/Documents/Washingtonian/K4_Database/ODBC\ install/Intel/PrimeBase_ODBC.4282. A simple way to enter this command is to enter CD and a space and then drag the installer directory onto the Terminalwindow. In the Terminal a space is represented by “\ ”.
  6. Run the Install_PrimeBase in Terminal using the sudocommand. Enter "sudo ./Install_PrimeBase". For those who are not familiar with Terminal, case matters. Note: your Mac OS X user account must have administrative privileges to do this task.
  7. Enter your password when requested.
  8. When you see the UNIX prompt the driver is installed.
  9. The files are installed at /usr/local/primebase/versions. In order to open this folder in the Finder you must select Go to Folder . . . from the Go menu and enter "/usr/local/primebase".
  10. In this directory there is a directory named versions. Inside of the versions directory there is a directory with the number of the version of the primebase drivers. We want the files inside the lib directory inside of this directory.
  11. We want to copy the 4 files in the lib folder:, and PBODBC.bundle. The last might appear as a directory. Go the the lib directory directly inside of the primebase directory and copy the files here.
  12. We are now ready to configure the files with iODBC Driver Manager that we installed in steps 1 & 2. Run OpenLink ODBC Administrator in your Utilities directory.
  13. Click on the ODBC Drivers tab and then click on the Add a Driver button.
  14. Enter a driver description that makes sense to you. I entered K4-PrimeBasebut you can use any descriptive name.
  15. Enter the driver file name and path. Enter "/usr/local/primebase/lib/". Leave the other fields blank.
  16. Click on the OK button.
  17. You should now see the driver you created added to the list. If done correctly the driver’s version number should be displayed.
  18. We now need to enter the K4 data source to either the User DSN or the System DSN. If added to the User DSN this connection will only be available to the current user account of the Mac. If you choose System DSN it will be available to all user accounts. In our example we will choose the User DSN.
  19. Click on the User DSN tab and then click on the Add button. You will be asked to select a ODBC driver and the driver you just installed in steps 13-16 will appear. Select that driver and then click on the Finish button. If you are lucky you will get a dialog requesting information for making the connection. If you are unlucky, as I am on my home iMac, you will get an error. If you get an error go on to step 20. If you do not get an error fill in the fields, accept your entries and go to step 22. The first 3 fields are the stock K4/Primebase setup. The IP address will be specific for your server.
  20. There should be a folder named ODBC in both the system and user Library folders. Open one of them. Then you will see 2 files, odbc.ini and odbcinst.ini. Quit OpenLink ODBC Administrator. Open odbc.ini in any text editor (I use BBedit). Make it similar to what you see to the right except that the driver should have the path to your file and PROT_OPTS should be set to the IP address of your K4 server. The Server and Database names shown here are the defaults, as it the Protocol.
  21. Reopen OpenLink ODBC Administrator.
  22. Select your DSN entry (made in step 19 or 20) and test it. Select the data source you created and lick on the Test button.
  23. Enter the K4 administrator’s name and password. This is not a K4 user account but the PrimeBase admin account. If everything was entered properly you will get a message that the test was successful. You should now be able to create a ODBC link between an application, such as Excel or FileMaker Pro, and your K4 database.
  24. Quick from OpenLink ODBC Administrator.
  25. Go to the next step, Setting Up Excel