If you are designing a report with Crystal Reports or connecting to live data with Excel, or requiring data access in a similar fashion from some other third-party tool, you will probably have to create an ODBC connection to the database.  This document simply describes creating that ODBC connection.

Step-by-step guide

Creating a Spire ODBC Connection

  1. Click the Windows Start button and type "ODBC".  Run one of the ODBC 32-bit data-sources shortcuts.

    • If you cannot easily find the appropriate shortcut, open the folder "C:\Windows\SysWOW64" and run the program odbcad32.exe.

  2. Under the "User DSN" tab, click on "Add", select "PostgreSQL Unicode" from the list and then click "Finish".

  3. Open the Spire Tray app and copy the name (case sensitive) of the desired target database to the "Database" field of the ODBC configuration:

  4. Populate the "Server" field with the name/address of the server machine, which would be "localhost" if you are developing on the server machine.
  5. Populate the "User Name" field with the PostgreSQL login role used by Spire (default value is "spireapp").
  6. Fill in the "Description" with an ad-hoc description.
  7. The "Port" should be left with the default value 5432.

  8. Please open the file spired.ini from the folder "C:\ProgramData\Spire" and copy/paste the password as illustrated (between the : and the @ of the spireapp login specifier) to the ODBC configuration's "Password" field:

  9. Click on "Test" and verify the connection is successful:

  10. Click on OK to dismiss the test, click on "Save" to save the connection, and then click on OK to close the ODBC configuration tool.  You now have an ODBC connection that can be used in apps such as Excel and Crystal Reports.

Common Problems

If you receive a connection error such as:

Most likely you're using a 64-bit application that isn't compatible with the 32-bit driver.  You can try to:

- install the 64-bit PostgreSQL ODBC driver from https://odbc.postgresql.org/ (look for the x64 MSI installer in the downloads section)

- run through the instructions above with the 64-bit version of the ODBC setup program instead of the 32-bit version

If you have further problems please contact Spire Support.