- What is ODBC?
ODBC is the acronym for Open Database Connectivity, a Microsoft
Universal Data Access standard that began as the Microsoft Windows implementation
of the X/Open SQL Call Level Interface (CLI) specification. Since its inception
in 1992, it has rapidly become the industry standard interface for developing
database-independent applications. It is also the emerging standard interface
for SQL-based database engines replacing many of the first generation Embedded
SQL and proprietary call level interfaces provided by database engine and
database connectivity middleware vendors.
End-User's Perspective
ODBC provides transparent access to corporate databases
via ODBC-compliant desktop applications such as Spreadsheets, Word Processors,
Presentation Tools, and Report Writers. Prior to the emergence and wide
adoption of ODBC end-users had no option but to acquire proprietary data
access middleware that was, and is, both application- and database-specific
in nature.
ODBC is necessary component of any modern operating system,
as it provides a standards-based link to relational database management
systems.
Developer's Perspective
ODBC is an Application Programming Interface (API) that
facilitates the development of database-independent applications. Prior
to ODBC, an application was written using the proprietary (aka native) APIs
specific to database management system. Thus, developers had to maintain
one version of their application for each supported back-end database.
- What is UDBC?
UDBC stands for Universal Database Connectivity. Developed
by OpenLink Software to facilitate the development of ODBC applications on
non-Windows operating systems, UDBC allows an application to bind directly
to an ODBC Driver — as opposed to an ODBC Driver Manager. In the non-Windows
world, there are situations where connecting to ODBC Drivers via the ODBC
Driver Manager is problematic, typically for the following reasons:
- Operating System hosting the application lacks a dynamic shared library
environment (a fundamental Driver Manager implementation component);
this is the case with many of the older versions of UNIX
- Application developer seeks to tightly integrate the ODBC Driver with
the application
For additional information relating to UDBC please visit:
- What is JDBC?
JDBC—or Java Database Connectivity—is a Java-based equivalent
of ODBC. JDBC facilitates the development of database-independent applications
written in the Java programming language.
JDBC-compliant applications can interact with ODBC Drivers
via a JDBC-ODBC Bridge. Likewise, ODBC applications can communicate with JDBC
Drivers via an ODBC-JDBC Bridge.
OpenLink Software provides both forms of JDBC and ODBC bridges,
in addition to its extensive pool of ODBC and JDBC Drivers for specific back-end
databases.
- What components make up the ODBC ecosystem?
The term "ODBC ecosystem" describes the collection
of components that facilitate the development of ODBC-compliant applications
and drivers. It also includes components that bind ODBC-compliant applications
with ODBC Drivers. The specific components that make up this ecosystem are
as follows:
User Resources
- ODBC Driver
The Driver is the actual piece of middleware (implemented
as a dynamic link library under Windows, and shared library on other
platforms) which is responsible for providing back-end database connectivity
to ODBC-compliant applications.
ODBC Drivers take a number of architectural forms,
depending on the driver vendor; in some cases they are generic, in others
database-specific. They are implemented as Frameworks (Mac OS X),
Shared Libraries (Darwin, UNIX, Linux, OpenVMS), Dynamic Link Libraries
(Windows), or Code Fragments (Mac OS 9).
- ODBC Driver Manager
A runtime component that binds ODBC-compliant
applications to ODBC Drivers, the Driver Manager is metaphorically similar
to printer managers in most operating environments. It provides a common
library interface consumed by ODBC Applications and implemented by ODBC
Drivers. At runtime, it associates ODBC-compliant applications with
an ODBC-compliant driver via ODBC Data Source Names (see below).
Some ODBC Driver Manager implementations translates API calls from one
version of the ODBC API to another; for instance in situations where
an application written to ODBC 2.0 is working with an ODBC 3.x Driver
and vice versa.
- ODBC Data Source Names (DSNs)
DSNs provide a logical naming scheme used to identify
the actual database environment being served by an ODBC Driver. They
are used by the Driver Manager to link an ODBC-compliant application
with an ODBC-compliant driver.
- ODBC Administrator
Based on the Microsoft Windows Printer Manager
metaphor, this control panel applet provides a graphic user interface
for managing ODBC data sources.
Its uses include: configuration of ODBC Data Source Names (by loading
the DSN setup dialogs for the respective ODBC Drivers), providing runtime
tracing capabilities to all Drivers, and unveiling Driver-specific metadata.
This component allows GUI or programmatic management of ODBC Data Source
Names (DSNs) and other aspects of the ODBC ecosystem. If an ODBC Administrator
is not available for a given platform, it is possible to edit ODBC DSNs
and their respective Driver settings by hand; this is typically done
via the "odbc.ini" or "ODBC.preference" file.
Developer Resources
- ODBC SDK
This is a standard software developer toolkit
comprising the necessary header files and libraries for developing ODBC-compliant
applications and drivers.
Application developers need platform-specific Software Development Kits,
or SDKs, as applications are made ODBC-aware by linking them against
such an SDK during compilation.�Similar SDKs are necessary to build
ODBC-compliant drivers.
- What is iODBC?
iODBC stands for Independent Open Database Connectivity. Commonly
considered to be specific to Linux or UNIX platforms, iODBC is a truly platform-independent
Open Source implementation of ODBC.
The iODBC effort is managed via the iODBC project which is
maintained and supported by Openlink Software at
<http://www.iodbc.org>.
iODBC and ODBC are 100% compatible. Thus, migration of ODBC-compliant
applications and drivers across platforms will not require wholesale rewrites.
Like ODBC on the Windows platform, iODBC comprises the following:
Runtime resources
- ODBC Drivers — These are Drivers that implement the iODBC
API.
- iODBC Driver Manager — The Driver Manager is implemented as
a Framework under Mac OS X; a Shared Library under Darwin, Linux,
UNIX and OpenVMS; and a Code Fragment under Mac OS 9.
- iODBC Administrator — iODBC provides native GUI-based ODBC Administrators
for Mac OS 9 and Mac OS X. An HTTP-based Administrator
is also available for all iODBC-supported client platforms except the
Classic Mac OS.
Development resources
- iODBC SDK — Used by developers for the development of ODBC-compliant
database applications and drivers, the iODBC SDK includes all necessary
Header Files and Shared and Static Link Libraries, as well as the library
sources.
- Is ODBC faster or slower than a “native” database connection?
This topic has been debated since the launch of ODBC. The
answer is simple — it depends on the driver.
OpenLink Software has been working to change a false perception
that ODBC is generally slow, by delivering high-performance drivers for ODBC,
since 1993. This misconception is primarily due a poor first impression given
by some of the early driver implementations from a variety of sources. OpenLink's
High-Performance Drivers for ODBC have consistently ensured that performance
is never an impediment to adopting ODBC.
- Is ODBC installed on Mac OS X by default?
It depends on what version of Mac OS X you are using.
In Mac OS X 10.0 through version 10.1.5, Apple did
not include any ODBC components. Third parties including OpenLink Software
did make ODBC Driver Managers and Drivers available for user installation
during this period.
With the release of Mac OS X 10.2, “Jaguar,” Apple
began to include the basic runtime libraries and SDK components of the iODBC
Driver Manager. The same components were incorporated into the open source
distribution of Darwin, Mac OS X's kernel, some months earlier.
Runtime libraries may be found in
/usr/lib, and, if the Developer Tools are installed, SDK components
may be found in /usr/include.
Jaguar also includes Apple's ODBC
Administrator, a simple, Aqua-based, ODBC-compliant application, which
permits basic configuration of the ODBC environment and creation and modification
of DSNs, provided one knows all relevant parameter names and acceptable values.
The ODBC Administrator may be found in /Applications/Utilities.
The OpenLink ODBC
Administrator is a more sophisticated Administrator, delivering identical
functionality to its counterpart on Windows. This Aqua-based, ODBC-compliant
application permits all the same activity as Apple's Administrator, with some
additional features and benefits. For instance, it understands “Setup Libraries,”
included and installed with most ODBC-compliant drivers and presents user-friendly,
driver-specific, DSN configuration dialogs, as defined by the driver developers.
Also, the OpenLink ODBC Administrator includes a TEST button, which permits
quick and easy confirmation that a DSN has been properly defined and is functional.
The OpenLink ODBC Administrator is not installed in Mac OS X
by default. It is part of the OpenLink iODBC SDK, available from
<http://www.iodbc.org/>.
The OpenLink ODBC Administrator is also an installation option with all of
OpenLink Software's Drivers for ODBC on Mac OS X. When present,
the OpenLink ODBC Administrator may also be found at
/Applications/Utilities.
- How can I tell what version of iODBC is installed on my
Mac?�How can I tell what driver versions are installed?
Versions of all active Driver Manager and Administrator components
are shown in the About tab of both Apple's ODBC Administrator and the OpenLink
ODBC Administrator.�
The Drivers tab of the OpenLink ODBC Administrator will likewise
display versions of all installed drivers; Apple's ODBC Administrator does
not display driver versions.�Making a connection with the sample iODBC Test.command
will also display version information for the driver in use for that DSN.
Both Apple's and OpenLink's Administrator applications will
show the date-stamps associated with a Driver's library files.�However, due
to the way that files are handled on Unix-based operating systems, these date-stamps
may not accurately reflect the build or installation date of the driver.
- What are the differences between File, User, and System DSNs?
System DSNs are available to all users, processes, and applications
on the Mac, but only Administrator-privileged users may edit or create a System
DSN. System DSNs are all stored in a single file; depending on the versions
of iODBC and the Mac OS, it is either /Library/Preferences/ODBC.preference
or /Library/ODBC/odbc.ini.
Mac OS X 10.1.5 and earlier generally use ODBC.preference; Mac OS X
10.2 and later generally use odbc.ini.�
User DSNs are available only to the user who created them,
and any applications or processes running as the same user. User DSNs are
stored in a single file per user; depending on the versions of iODBC and the
Mac OS, it is either ~/Library/Preferences/ODBC.preference
or ~/Library/ODBC/odbc.ini.
Mac OS X 10.1.5 and earlier generally use ODBC.preference; Mac OS X
10.2 and later generally use odbc.ini.�
File DSNs are currently unsupported on Mac OS X.
This support will be delivered in a future release of iODBC. Each File DSN
is stored in its own file (hence the name), and these files may be duplicated
and shared among users just as any other file may. Any user who wishes to
use the File DSN must have access to a Driver of the same name as was used
to create the DSN. The Driver version need not be identical, if parameter
names and acceptable values have not changed.
- How do I install and register ODBC-compliant drivers
on Mac OS X?
If a driver is visible in either the Apple or OpenLink ODBC
Administrator's “Drivers” tab, it has been correctly installed and registered.
The default location for driver installation on Mac OS X
is /Library/ODBC. Drivers which
are only meant to be used by one User should generally be installed at ~/Library/ODBC.
OpenLink drivers for ODBC come in standard Mac OS X
Installer packages.�Other driver vendors may provide similar installer packages,
standalone installer utilities, or instructions for command-line installation.
Follow the driver vendor's instructions for installation, if available.
Generally speaking, the installer should place the driver
in the correct location and register it with the Driver Manager. Alternatively,
you may choose to manually install a driver through the "Drivers"
tab of the ODBC Administrator.
If the driver includes a setup library, it may also be registered
through the Drivers tab to ease DSN configuration. (If the driver did not
include a setup library, DSN configuration requires that all necessary connection
parameters be manually entered as Key/Value pairs. Users must know all parameter
keywords and acceptable values for each.) Note that the Apple ODBC Administrator
will register Setup libraries, but it will not make use of them. The OpenLink
ODBC Administrator will both register and use Setup libraries.
Finally, experienced users may choose to manually edit the
appropriate file —
- System drivers are registered in /Library/ODBC/odbcinst.ini
or /Library/Preferences/ODBC Installer.preference,
depending on the versions of iODBC and the Mac OS. Generally, Mac OS X
10.1.5 and earlier will use ODBC Installer.preference;
Mac OS X 10.2 and later will use odbcinst.ini.�System drivers
are available to all users, processes, and applications on the Mac,
but only Administrator-privileged users may change their configuration.
- User drivers are registered in ~/Library/ODBC/odbcinst.ini
or ~/Library/Preferences/ODBC Installer.preference,
depending on the versions of iODBC and the Mac OS. Generally, Mac OS X
10.1.5 and earlier will use ODBC Installer.preference;
Mac OS X 10.2 and later will use odbcinst.ini.�
User drivers are available only to the user who registered them and
any applications or processes running as that user.
- Where do I put my license file?
OpenLink products on Mac OS 9 check only one location
for valid license files:
System Folder :
Preferences
OpenLink products on Mac OS X check the following
locations, in this order, for valid license files:
a. Current directory
b. $OPL_LICENSE_DIR
c. $PATH
d. /Library/Application Support/OpenLink/bin/
NOTE - this is the root /Library
directory, not a User's ~/Library directory.
Each license file found is evaluated first for product applicability.
The first license found to apply to the product in use is evaluated for expiration
date and other terms. No further searching takes place, if this license is
found to bar the attempted action.
OpenLink recommends placing all Mac OS X licenses
in the above location (d) above, to minimize the possibility of conflicting
license files on the same machine.
- Why are some drivers registered to System and some to User?
Drivers registered at the System level are available to all
users, processes, and applications on the Mac, but only Administrator-privileged
users may register or configure a System Driver. Registration records for
these drivers are all stored in a single file; depending on the versions of
iODBC and the Mac OS, it is either /Library/ODBC/odbcinst.ini
or /Library/Preferences/ODBC Installer.preference.
Mac OS X 10.2 and later generally use odbcinst.ini; Mac OS X
10.1.5 and earlier generally use ODBC Installer.preference.�
Drivers may also be registered at the User level. Such drivers
will be available only to the user who registered and configured them. Registration
records for these drivers are stored in one file per user; depending on the
versions of iODBC and the Mac OS, it is either ~/Library/Preferences/ODBC Installer.preference
or ~/Library/ODBC/odbcinst.ini.
Mac OS X 10.2 and later generally use odbcinst.ini; Mac OS X
10.1.5 and earlier generally use ODBC Installer.preference.�
- How do I connect to a data source from Mac OS X?
In simplest terms, direct an ODBC-compliant client application
to an ODBC-compliant driver, with appropriate values for all connection parameters
required by that driver.
In most cases, the application will be aimed at a Data Source
Name (DSN), which has been configured through the ODBC Administrator. This
DSN will hold all connection parameters for the driver and data source in
question, and you will only have to tell the client application what DSN to
use.
Some applications will require, or construct for themselves
after asking the user some questions, an ODBC Connection String.�This string
simply collects all the parameters normally captured in a DSN and presents
them directly to the Driver Manager, without storing them in a file or giving
the connection a name.
- How do I create a DSN?
For best results, create all DSNs through OpenLink or Apple's
ODBC Administrator. Advanced ODBC users may also choose to manually edit the
text files containing all stored DSN settings (the file odbc.ini
or ODBC.preference).
Launch the chosen ODBC Administrator, select the User or System
DSN tab, and click the "Add" button. This will bring up a dialog
to choose a previously-registered driver to use for this DSN. Next, you will
get a dialog requesting driver-specific connection information. The Apple
ODBC Administrator will present a very simple tabular interface, which must
be completed by someone who knows all relevant Keywords and acceptable Values
for each. The OpenLink ODBC Administrator may present a similar tabular interface,
if the driver has no associated Setup library; if there is an associated Setup
library, the OpenLink ODBC Administrator will present a dialog as specified
by the driver developer.
It is generally recommended that a DSN be tested immediately
after creation, to ensure that it has been correctly configured.
- How do I test a DSN?
The easiest way to test a DSN is by using the Test button
in the OpenLink ODBC Administrator. Simply highlight the chosen DSN and click
the Test button. When prompted, enter the username and password for
the back-end data source and click OK.
If the OpenLink ODBC Administrator is not available, DSNs
can be tested with the command-line odbctest application. Either double-click
the /Applications/iODBC/iODBC Test.command
script or manually launch the Terminal application (found in /Applications/Utilities).�
If you used the script, you can skip ahead to the next paragraph;
otherwise, ensure that the environment variables ODBCINI and ODBCINSTINI are
set correctly and enter the command
/usr/bin/odbctest.
At the prompt, type a question-mark (?) followed by the ENTER
key, to show a list of available DSNs. Enter a connect string at the next
prompt, using the syntax:
DSN=<DSN Name>[;UID=<username>[;PWD=<password>]]
Text enclosed in angle brackets < > should be replaced
by your environment's specifics; text enclosed in square brackets [ ] is optional.
The only mandatory parameter is the "DSN=". All other connect parameters
may be set within the DSN itself. User authentication in the connect string
will override similar information stored in the DSN. The following connect
strings are all valid, assuming a DSN named test_dsn exists —
DSN=test_dsn
DSN=test_dsn;UID=;PWD=
DSN=test_dsn;UID=fred
DSN=test_dsn;UID=fred;PWD=
DSN=test_dsn;UID=fred;PWD=derf
A successful connection will cause display of the Driver's
full version string, as it reports to any client application, followed by
a SQL> prompt. Once the
connection is made, any valid SQL query conforming to ODBC syntax (where applicable)
may be executed. Use the command quit
to close the connection.
Enter ODBC connect
string (? shows list, or DSN=...):
DSN=test_dsn;UID=fred;PWD=derf
Driver: 04.20.0402 OpenLink SQL Server Lite Driver
SQL>quit
Again (y/n) ? n
Have a nice day.
- Why doesn’t FileMaker Pro for Mac OS X
see my DSNs?
Background
FileMaker Pro 5.0 and 5.5 for Mac OS X are not
ODBC-compliant client applications, though their Mac OS 9 cousins
are.�An upgrade will be required to access ODBC Data Sources in the Mac OS X
environment.
FileMaker Pro 6.0 is fully ODBC-compliant.�However, it was built with support
for both the iODBC Driver Manager, which ships with Mac OS X 10.2
("Jaguar"), and the DataDirect Driver Manager, which ships with
FileMaker Pro for Mac OS X.�The way this dual-support was built
into FileMaker Pro, it looks for DataDirect first, and only looks for iODBC
if the other is not present.
Enabling FileMaker Pro to use the OpenLink Drivers
As initially installed, FileMaker Pro will find iODBC
and make use of all its DSNs. The DataDirect Driver Manager is only installed
if the secondary `FileMaker Pro ODBC Drivers` installer is run.
You can disable or uninstall the DataDirect Driver Manager, to make full
use of OpenLink drivers.�Please note that this will also disable the Text
Driver shipped with FileMaker Pro, but will cause no other problems.�OpenLink
does not take an official position on whether or not to disable or uninstall
these components; you may do either on your own volition. If you choose
to uninstall, you can reinstall them at any time, by re-running the "FileMaker
Pro ODBC Drivers" installer.
Open a Terminal window (the Terminal application is in the Utilities subfolder
of the Applications folder), and execute the commands corresponding to your
desired result.�The first `sudo` command will prompt for your password --
you must be an Administrator to proceed.
You must quit and relaunch FileMaker Pro for these changes to take effect.
To Disable —
cd /Library/CFMSupport/
sudo mkdir Disabled
sudo mv FileMaker* Disabled
sudo mv ODBC* Disabled
To Re-enable —
cd /Library/CFMSupport/
sudo mv Disabled/* .
To Remove —
sudo rm -R "/Library/Documentation/Help/DataDirect
Help.help"
sudo rm -R "/Applications/DataDirect ODBC folder"
sudo rm /Library/Preferences/fdodbc.lic
sudo rm "/Library/CFMSupport/FileMaker 4.0 Utility Library"
sudo rm "/Library/CFMSupport/FileMaker 4.0 Text Driver"
sudo rm "/Library/CFMSupport/FileMaker 4.0 Flat Library"
sudo rm "/Library/CFMSupport/FileMaker 4.0 Base Library"
sudo rm "/Library/CFMSupport/ODBC Cursor Library"
sudo rm "/Library/CFMSupport/ODBC Trace Library"
sudo rm "/Library/CFMSupport/ODBC Configuration Manager"
sudo rm "/Library/CFMSupport/ODBC Driver Manager"
- What ODBC-compliant client applications are available
on Mac OS X?
A number of software publishers have made ODBC-compliant client
applications available on Mac OS X.�
Microsoft Office v.X applications Excel and Word currently
support updating ODBC-linked documents. As of this writing, however, Microsoft
Query v.X has not yet been released, so new documents cannot be created, and
existing queries cannot be edited.�For more information, see
<http://www.microsoft.com/mac/>
FileMaker Pro 6 can be used as a front-end to an ODBC connection.
(See later question for more information about using FileMaker Pro as an ODBC
Client or Data Source.) For more information, see
<http://www.filemaker.com/>
Other ODBC-compliant client applications for Mac OS X include:
- Which databases which run on Mac OS X can I access
using ODBC?
OpenLink Virtuoso – a Universal Server that enables a single
ODBC connection to concurrently connect you to several ODBC accessible databases
from a variety of database vendors. 30-day evaluations are available for download
from
<http://www.openlinksw.com/virtuoso/>.
Other DBMS available for Mac OS X include:
- Where can I get ODBC-compliant drivers for Mac OS X?
OpenLink Software publishes ODBC-compliant drivers for Mac OS X,
as well as for Mac OS 9 (and the Classic Environment), enabling
connections to relational databases both local and remote. JDBC-compliant
drivers are also available, for use on any platform with a JVM. Free evaluation
downloads of all OpenLink products are available from
<http://www.openlinksw.com/>.
Many database vendors provide drivers for their databases,
and these should be installed and configured as documented by the database
vendor.
A number of third parties produce drivers for ODBC and JDBC,
for use with many data sources.�Any ODBC-compliant driver compiled with the
iODBC SDK, as distributed either by Apple, iODBC.org, or OpenLink Software,
will work with the iODBC Driver Manager on Mac OS X.
A large list of sources for ODBC drivers may be found at —
- How do I connect to OpenBase?
OpenLink's Multi-Tier solution offers connectivity to JDBC-compliant
data sources via an ODBC-JDBC bridge component.�This involves a two-tier installation,
including the Generic ODBC driver and iODBC Driver Manager on the client machine,
along with the Request Broker and ODBC-JDBC Bridge Agent on the OS X server.�
More information is provided in the Multi-Tier online documentation, in the
OpenLink
ODBC-JDBC Bridge Agent Installation and Configuration section.
It is strongly recommended that you use the latest revision
of both OpenBase and the OpenLink components. OpenLink components as installed
by OpenBase may not be the most current; thus, you may wish to manually update
them, as described below.
Please note — OpenBase updates will over-write existing OpenLink
components, when contained within /Library/OpenBase/ODBC.�
If you have previously updated the Darwin-based OpenLink components as installed
by OpenBase, they may be (or have been) reverted to a prior OpenLink Release.�
You may avoid this reversion by either of the following options:
- Retain the Darwin-based OpenLink components, by copying the /Library/OpenBase/ODBC
directory to another location, applying the OpenBase update, and copying
the ODBC directory back.
- Download and install the Mac OS X-based OpenLink components,
and delete the ODBC subdirectory of the OpenBase installation. Visit
the main OpenLink website, select “Product Availability & Download,”
and proceed through the Download Assistant. For best results, OpenLink
recommends using the Download Wizard, to ensure you get all necessary
components.
- How can I use FileMaker Pro as an ODBC data source?�
OpenLink does not provide a Single-Tier Driver for FileMaker
Pro on any platform.�However, OpenLink's Multi-Tier ODBC-Bridge solution is
an option, if the user has a Windows machine available for use as either a
Gateway Server or the FileMaker Pro host.
From the OpenLink Multi-Tier Generic Client Driver on Mac OS X,
the user reaches to the OpenLink ODBC Bridge on the Windows machine, which
may then connect through the FileMaker Driver to local FileMaker instances
on that Windows machine or remote FileMaker instances on any platform FileMaker
supports as an ODBC data provider.
- How can I connect to a remote Microsoft SQL Server database?
OpenLink provides two Data Access solutions to address this
need.�The Single-Tier (Lite) Data Access solution provides the ability to
connect to MS-SQLServer via a database-specific driver on the Mac client machine.�
This solution is recommended and is desirable for most users as it does not
require any additional software installation on the Windows database server.�
The Multi-Tier Data Access solution—by contrast—requires the Multi-Tier server
components to be installed on the Windows server.�The driver named "OpenLink
Generic ODBC Driver" in the ODBC Administrator provides the client connectivity
for the Multi-Tier solution.
- What ODBC developer resources are available for Mac OS X?
On the scripting front, Perl and PHP can both be configured
to use ODBC by following the How-To guides at
<http://www.iodbc.org/>. (More information
on PHP connectivity is in another FAQ on this list.)
Other resources include:
- What is the difference between ODBC on Mac OS 9
(or in the Classic Environment), and on Mac OS X?
The Mac OS now has three basic kinds of binaries — Cocoa,
Carbon, and Classic. Binaries may include Applications, Extensions, Control
Panels, Libraries etc.
Cocoa is the newest development environment, strictly for
Mac OS X, and takes advantage of all new Mac OS X features
and benefits. Cocoa binaries can only be used in Mac OS X. See below
for limitations of Cocoa binaries, with regards to each of the other kinds.
Carbon binaries get most of the benefits of Mac OS X
and are quickly produced from existing Classic code. Carbon has two flavors
itself — Mach-O and CFM (or Code Fragment Managed). Mach-O binaries are produced
from the same code base as CFM binaries, but while CFM binaries may be used
in Mac OS 9 or Mac OS X, Mach-O binaries will only run
in Mac OS X, just as if they were Cocoa. Cocoa binaries can only
use CFM binaries through specially constructed CFM Bridge components; however,
they can make full use of Mach-O binaries.
Classic binaries are only usable in Mac OS 9 or
in the Classic Environment. CFM binaries may interact with Classic binaries
in many cases, generally through a CFM Bridge. Mach-O and Cocoa binaries can
make use of Classic binaries in very few circumstances.
The iODBC implementation for Mac OS 9, as well as
all other Driver Managers and Drivers found in Mac OS 9 and earlier,
are Classic binaries. Thus, as noted above, they cannot be used in Mac OS X,
nor accessed from the Mac OS X Environment when being used in the
Classic Environment. The iODBC Driver Manager includes the Classic iODBC
CFM Bridge extension, enabling CFM binaries running in Mac OS 9
to use all the old Classic components, exactly as if they were Carbonized
components.
The Mac OS X implementation of iODBC is currently
Mach-O and includes the /Library/CFMSupport/iODBC
CFM Bridge. This combination permits all Mac OS X binaries,
whether Cocoa, Carbon Mach-O, or Carbon CFM, to use iODBC and all associated
Drivers.�
- What methods are available for compiling ODBC applications
with iODBC?
The iODBC SDK, available from
<http://www.iodbc.org>,
provides developers with the tools necessary for the development of ODBC-compliant
database applications and drivers.�This includes all necessary Header Files,
and Shared and Static Link Libraries, as well as the library sources, required
for compilation.
There are two main ways to compile applications on Mac OS
X:
- The command line “shared libraries”-based approach (for experienced
Unix/Linux/BSD users)
This method will produce applications that run within
the command line environment.�If you choose this method and are running
Mac OS 10.1.5 or earlier, download the ODBC SDK for “Darwin” from OpenLink's
website or
<http://www.iodbc.org>.
- The GUI “Frameworks”-based approach (for developers preferring
a graphical environment)
As noted in the above answer to the question What
is the difference between ODBC on Mac OS 9 (or in the Classic
Environment), and on Mac OS X?, executables on Mac OS X
may be either Carbon- or Cocoa-based; further, Carbon applications may
be either Preferred Executable Format ("PEF"; also known as
CFM-based, because the Code Fragment Manager is required to prepare and
execute such files), or Mach-O.�
Carbon-based Mach-O executables, and all Cocoa-based
executables, can only be run on Mac OS X. Carbon-based PEF executables
can run on Mac OS X as well as some earlier systems.
PEF executables must be compiled with a link to the
iODBC CFM Bridge, to make them ODBC-aware. This component enables a PEF
executable to make use of the iODBC components present, regardless of
whether it is running on Mac OS X or Mac OS 9.
More information on compiling Carbon applications
in the OS X environment can be found at the Apple links below:
If you choose the Cocoa method, from our Software
Availability and Download’s Universal SDK page choose the appropriate
OS X release as your operating system; you will then be presented with
the appropriate software.�Additional technical information on compiling
pure Cocoa applications is provided at the Knowledgebase article below:
- Why can’t my Mac OS 9 Applications see my Mac OS X
DSNs when running in the Classic Environment on the same Mac?
The Mac OS 9 implementation of iODBC, as well as
all other Drivers and Driver Managers found in Mac OS 9, are Classic
binaries. Thus, as noted above, they cannot be used in Mac OS X,
nor accessed from the Mac OS X Environment when being used in the
Classic Environment.
To access ODBC Data Sources with Mac OS 9 applications,
you must install and configure the Mac OS 9 ODBC client components
in the Classic Environment's System Folder. DSNs are not interchangeable between
Mac OS X and Mac OS 9.
- How can I use PHP with ODBC on Mac OS X?
PHP is a server-side, cross-platform, HTML embedded scripting
language which is built into the Mac OS X operating system. As this default
PHP module is not ODBC-enabled, it is necessary to update the pre-installed
module to one which supports ODBC connectivity.
The latest — and recommended — PHP version is 4.2.3, and it
currently only runs on Mac OS X version 10.2 (Jaguar). If you need a version
that runs on 10.1.x, the older 4.2.2 version is also available.
You have two options for enabling iODBC in your PHP distribution:
Compile from the PHP source
If you prefer to compile from scratch, this requires the
source files available from www.Apache.org and www.PHP.net.�For those already
familiar with this process, the iODBC configure flag is
--with-iodbc
For more information on this entire process, visit our How-To guide for OS
X-specific PHP source compilation here:�
Install the pre-compiled iODBC-enabled PHP module
You can alternatively download and activate�a pre-compiled
iODBC-enabled PHP module.�More information on this method can be found at
the following Knowledgebase article:
- Do OpenLink Single-Tier Drivers for Mac OS X require
additional software from the database vendor?
Most OpenLink Single-Tier Drivers for Mac OS X require
no additional software.�
At the present time, the OpenLink Single-Tier Driver for Sybase
(CT-Lib) is the only driver that requires components from the database vendor.�
In this case, the requirement is the Sybase Client Networking components,
also known as OpenClient.
- Why won't Microsoft Excel bring up the Query window when
I try to create a new ODBC database query?
Microsoft Query v.X has not yet been released, so new ODBC-linked
documents cannot be created, and existing queries cannot be edited, in Microsoft
Excel or Word v.X.
Both Excel and Word v.X (Service Release 1) support updating
ODBC-linked documents.
- Will ODBC allow me to connect my web application (such as
WebObjects, Coldfusion, or Lasso) to a remote database?
Most web application development environments on OS X do not
yet provide native support for ODBC.�Instead, they provide built-in JDBC support,
and to meet this need, the OpenLink Multi-Tier Data Access Driver solution
delivers a pure-Java JDBC 2.0-compliant driver.�