|
|
||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
[Figure 28 - Enable FileMaker 7 ODBC/JDBC Sharing for All Users]
Open the OpenLink ODBC Administrator from the Applications/Utilities folder [see Figure 29] to create a new FileMaker 7 System DSN.
![]()
[Figure 29 - Launch OpenLink ODBC Administrator]
Before the new FileMaker 7 ODBC driver can be used, it needs to be added to the ODBC Administrator - this task only needs to be done once. This driver will be added as a System driver, so that System DSNs can be created. This is the preferred way to add the driver and ODBC DSNs in order for all applications on a computer to utilize the ODBC DSN. Click the ODBC Drivers tab, then click the Add a driver button.
![[Figure 30 - Click Add a Driver Button]](tech_note_creating_odbc_dsn_macosx/fmp7_add_driver_button_before_adding.gif)
[Figure 30 - Click Add a Driver Button]
Select the System radio button.
Enter the Description and the Driver file name for the
driver:
Description of the driver: FileMaker 7 ODBC
Driver file name: /Library/ODBC/SequeLink.bundle/Contents/MacOS/ivslk18.dylib
Note: It is not possible to use the Browse button to select the ivslk18.dylib
file, this full pathname needs to be entered manually. You can copy
and paste the path directly from this web page.
There is no info required for the Setup file name and there are no keyword/value
pairs required when adding the driver.
Click the OK button.
![[Figure 30 - Select System as Driver Type, Enter Driver Parameters, then Click Ok Button]](tech_note_creating_odbc_dsn_macosx/fmp7_add_driver_params.gif)
[Figure 30 - Select System as Driver Type, Enter Driver Parameters,
then Click OK Button]
After Adding the FileMaker 7 ODBC driver, it now shows up in the list of drivers under the ODBC Drivers tab of the iODBC Data Source Administrator.
[Figure 31 - FileMaker 7 ODBC Driver Listed in ODBC Drivers Tab After
Installation]
Now that the FileMaker 7 ODBC driver has been added, click the System DSN tab, then click the Add button to add a new ODBC System DSN for the FileMaker 7 test database file. Select the newly added FileMaker 7 ODBC driver, then click the Finish button.
![[Figure 32 - Select FileMaker 7 ODBC Driver]](tech_note_creating_odbc_dsn_macosx/fmp7_select_fmp_odbc_driver.gif)
[Figure 32 - Select the FileMaker 7 ODBC Driver]
Enter the name of the ODBC DSN in the first field. For
this tech note use: example_fmp_dsn.
Enter information for each of the following parameters:
|
FileMaker 7 ODBC Parameters
|
|
|
Keyword
|
Value
|
| Host | 127.0.0.1 |
| Port | 2399 |
| ServerDataSource | Default or fmpws_fmp01 |
| ServerDataName | Default or fmpws_fmp01 |
For each parameter, enter the Keyword name exactly as it is listed here,
enter the value then click on the Add button to the right of the Keyword
field. Either enter the text Default or the FileMaker 7 database
filename for the ServerDataSource and ServerDataName (without the .fp7
file extension). Using the Value Default is an undocumented technique
which can be easier to use while developing FileMaker databases. The
Default value enables developers to easily switch among different
database files simply by launching a new file within FileMaker 7 and
avoids the requirement to update the ODBC parameters in the DSN.
For a production database, it is better to specify the exact database name in order to avoid accidentally accessing the wrong table or database file. Using the exact database name insures that duplicate database tables can be uniquely identified based upon the database file in which they are located.
There are two additional parameters which have been identified
by FileMaker Technical Support as currently unused parameters. These
two parameters are LoginID and Password. A future revision of the FileMaker
7 SequeLink ODBC driver is expected to utilize these additional parameters.
The lack of support for these parameters is not generally considered
a serious problem because most applications which utilize ODBC connectivity
will also give you the option to enter a Login Name and Password which
will then be passed on to the ODBC driver.
Note: The operational features of the FileMaker 7 ODBC Driver
are very different from previously shipped FileMaker ODBC drivers. The
DataDirect SequeLink FileMaker driver included with FileMaker Pro 7
only permits ODBC connections to be made to a local FileMaker 7 database
running on the same computer. This is why the SequeLink Server Host
field must be filled in with the TCP/IP address of 127.0.0.1 or the
hostname "localhost". The feature of allowing external computers
to make an ODBC connection to a FileMaker 7 database is reserved for
the FileMaker Server 7 Advanced product.

[Figure 33 - Enter Parameters for the ODBC System DSN]
In order to verify that a connection can be made to the FileMaker 7 database, it is a good idea to test the ODBC connection before attempting to use the new ODBC DSN. OpenLink Software has provided a helpful Test button within their driver setup window which will enable testing of ODBC database connectivity.
Select the example_fmp_dsn, then click the Test button
shown in Figure 34 to verify that a connection can be made to the new
FileMaker 7 database.
![]() |
[Figure 34 - Test the FileMaker 7 ODBC DSN - Click the Test Button]
The Connect dialog will contain default parameters from the ODBC DSN which is being tested, click the OK button to continue.
![[Figure 35 - Click Ok to Default Values]](tech_note_creating_odbc_dsn_macosx/fmp7_test_odbc_dsn2.gif)
[Figure 35 - Click OK to Use Default Values]
Enter Admin as the username, with no password, then click the OK button.
[Figure 36 - Enter FileMaker 7 Admin Account Name, Click OK Button]
Click the OK button to close the test results dialog box.
![[Figure 37 - Successful Test Dialog]](tech_note_creating_odbc_dsn_macosx/fmp7_test_odbc_dsn4.gif)
[Figure 37 - Successful Test Dialog]
Note: If the connection test fails, verify that ODBC/JDBC sharing
is turned on and that an older version of FileMaker is not running
with the Local or Remote Data Access Companion plug-ins enabled. The
HY000 error shown in Figure 38 resulted from having FileMaker 6 and
FileMaker 7 ODBC sharing enabled at the same time, thus causing a
conflict between the two database applications.
![[Figure 38 - HY000 Error Dialog - Due to Sharing Conflict]](tech_note_creating_odbc_dsn_macosx/fmp7_test_odbc_dsn_error1.gif)
[Figure 38 - HY000 Error Dialog - Due to Sharing Conflict]
Additional ODBC connectivity testing can be performed with the FmPro Worksheet utility. FmPro Worksheet is a free utility which sends SQL commands to FileMaker 7 databases via an ODBC connection. Results and error messages are returned within the program and can be saved to disk. All FileMaker 7 SQL commands are supported including CREATE TABLE, DROP TABLE, SELECT, INSERT, UPDATE and DELETE. Using FmPro Worksheet, it is also possible to create, save, and reload FileMaker 7 SQL commands as standard text files.
The default ODBC DSN listed within FmPro Worksheet is
example_fmp_dsn, which matches the ODBC DSN created in this
tech note. Therefore pressing the Execute SQL button
within FmPro Worksheet will execute the default SQL code and create
a new table named example within the fmpws_fmp01.fp7
FileMaker 7 database [See Figure 39 and 40]. There will be no results
displayed in the Results field of FmPro Worksheet when a table is
successfully created within FileMaker 7, but the new table will be
visible within the Tables tab of the Define Database dialog.
![[Figure 39 - Creating New Table With FmPro Worksheet]](tech_note_creating_odbc_dsn_macosx/fmpro_worksheet102_screenshot_macosx_red_circle.gif)
[Figure 39 - Creating New Table With FmPro Worksheet]
![[Figure 40 - New Table Shown in FileMaker 7]](tech_note_creating_odbc_dsn_macosx/fmp7_example_table_in_define_database.gif)
[Figure 40 - New Table Shown in FileMaker 7]
Pressing the Execute SQL button a 2nd time will cause FileMaker ODBC Driver Error 12 "Duplicate Name" to be displayed because the table named example already exists in the database [see Figure 41]. This same error will also occur if the table exists only on the Relationship Graph. This is one reason why it is a good idea to delete a FileMaker 7 table from the database and the Relationship Graph at the same time.
![[Figure 41 - Duplicate Name Error (12) Shown in FmPro Worksheet]](tech_note_creating_odbc_dsn_macosx/fmpro_worksheet_mac_screenshot_error.gif)
[Figure 41 - Duplicate Name Error (12) Shown in FmPro Worksheet]
If the FileMaker 7 Define Database/Fields window is open when creating a new database table, the result will be "Database Schema is Locked by Another User Error (303)".
![[Figure 42 - Database Schema is Locked by Another User Error (303) Shown in FmPro Worksheet]](tech_note_creating_odbc_dsn_macosx/fmpro_worksheet_mac_screenshot_error303.gif)
[Figure 42 - Database Schema is Locked by Another User Error (303)
Shown in FmPro Worksheet]
If FmPro Worksheet displays the "Can't open database revdberr, invalid database type" error shown in Figure 43, then use the following troubleshooting instructions:

[Figure 43 - FmPro Worksheet revdberr, invalid database Error Dialog
]
First, open the MacOS X Console application (/Applications/Utilities/Console) to see if errors have been generated by FmPro Worksheet. An example error within the Console log may look like the following:
2005-08-20 10:32:54.968 FmPro Worksheet 1.02[2853]
CFLog (21): Error loading /Users/<loginaccount>/fmpro_worksheet/FmPro
Worksheet 1.02.app/Contents/MacOS/externals/database_drivers/dbodbc/Contents/MacOS/dbodbc:
error code 4, error number 0 (Library not loaded: /Library/Frameworks/iODBC.framework/Versions/3.51/iODBC
This error means that FmPro Worksheet is looking for the iODBC 3.51 framework but it was not found. This error could occur if the OpenLink Software Universal Data Access (UDA) ODBC-JDBC Lite Bridge driver software was not installed. This error also occurs after installing a later version of OpenLink Software with a higher version number than 3.51. To troubleshoot this problem further, use the MacOS X Terminal to verify which version of iODBC software was installed.
Using the Terminal, type the following:
cd /Library/Frameworks/iODBC.framework/Versions
ls -l
it is likely that the following directory structure
will be displayed:
drwxrwxr-x 5 root admin 170 Oct 3 2004 3.52
lrwxr-xr-x 1 root admin 4 Aug 19 16:30 Current -> 3.52
$loginaccount /Library/Frameworks/iODBC.framework/Versions
This means that the iODBC 3.51 framework won't be found by the FmPro Worksheet executable because the iODBC 3.52 framework has been installed. The solution to this problem is to create a symbolic link from the 3.52 framework to 3.51, which will then be found by FmPro Worksheet.
Type the following commands to create the symbolic link:
sudo ln -s 3.52 3.51
Now FmPro Worksheet should be able to find the iODBC 3.51 symbolic
link, which actually is mapped to the iODBC 3.52 framework as shown
in the following /Library/Frameworks/iODBC.framework/Versions
directory listing:
lrwxr-xr-x 1 root admin 4 Aug 20 10:58 3.51 -> 3.52
drwxrwxr-x 5 root admin 170 Oct 3 2004 3.52
lrwxr-xr-x 1 root admin 4 Aug 19 16:30 Current -> 3.52
$loginaccount /Library/Frameworks/iODBC.framework/Versions
![]()
![]()