ODBC Router Frequently Asked Questions
Developing Applications that use ODBC and ODBC RouterAbout ODBC
ODBC stands for Open Database Connectivity, a Microsoft product based upon X/Open's CLI (Call Level Interface). ODBC is essentially a standard Application Programming Interface that allows applications to interact with databases without any vendor-specific coding. Like printing, the Customer traditionally completes the connection between the application and the database by installing a driver on each of their computers.
About the ODBC Control Panel
The ODBC Control Panel is where the Customer traditionally maintains their list of data sources using ODBC drivers much as they might administer printing destinations with printer drivers. Like printer drivers, ODBC drivers typically implement their own "setup dialog" that is called by the ODBC Control Panel to maintain driver data source parameters. The Customer's list of data source names, corresponding ODBC drivers and any parameters are all managed exclusively by the ODBC Control Panel.
About the ODBC Driver Manager
Database applications normally link to a shared-library (DLL) called an ODBC Driver Manager (DM) that implements the generic ODBC API. But the DM itself generally does not actually process the requests; instead, the DM passes each API call through to a specific vendor's ODBC driver that is contained in another shared-library. The DM knows which ODBC driver to pass the application's database calls thru to by having first intercepted the initial "Data Source Connect" call and having looked-up the requested data source in the list maintained by the Customer with their ODBC Control Panel. ODBC drivers themselves actually process the application's database API call, though they may callback into the ODBC Configuration Manager (part of the ODBC Control Panel) when they need to store or retrieve parameters.
About ODBC on Macintosh
Apple originally produced an ODBC Control Panel and an ODBC Driver Manager for Macintosh that Microsoft supported in its Office product. In 1995, Apple relinquished these components to VISIGENIC, but Microsoft continued to support the original Apple components. VISIGENIC later dropped the product and Microsoft contracted with INTERSOLV for ODBC support in Office 98. INTERSOLV later merged with MicroFocus (PC COBOL) to become MERANT and went on to independently develop retail versions of Macintosh ODBC that do not behave like the version shipped with Office 98. Microsoft did not initially include such versions with Office 2001 until April 2002. MERANT later sold-off their ODBC products and Microsoft stopped bundling ODBC components with Office.X, convincing Apple to again bundle an ODBC Control Panel and an ODBC Driver Manager for Macintosh starting in Mac OS X 10.2 ("Jaguar") and 10.3 ("Panther") though the SDK needed to support it are not distributed by Apple, they're distributed by some third-party that has since (wait for it) released their own version of these components that (wait for it) again, do not behave like the version shipped by Apple.
Apple originally produced an ODBC Control Panel and an ODBC Driver Manager for Macintosh that Microsoft supported in its Office product. In 1995, Apple relinquished these components to VISIGENIC, but Microsoft continued to support the original Apple components. VISIGENIC later dropped the product and Microsoft contracted with INTERSOLV for ODBC support in Office 98. INTERSOLV later merged with MicroFocus (PC COBOL) to become MERANT and went on to independently develop retail versions of Macintosh ODBC that do not behave like the version shipped with Office 98. Microsoft did not initially include such versions with Office 2001 until April 2002. MERANT later sold-off their ODBC products and Microsoft stopped bundling ODBC components with Office.X, convincing Apple to again bundle an ODBC Control Panel and an ODBC Driver Manager for Macintosh starting in Mac OS X 10.2 ("Jaguar") and 10.3 ("Panther") though the SDK needed to support it are not distributed by Apple, they're distributed by some third-party that has since (wait for it) released their own version of these components that (wait for it) again, do not behave like the version shipped by Apple.
Thus, the challenges that Mac developers face in determining which versions of whose ODBC components are present on any given customer's system and which SDK to use are hardly worth the effort when, in any case, there are only four or five native ODBC drivers available for Macintosh. In one actual driver, some guy has downloaded freeware hacks known to crash SQLServer and in another he fires up the Java Virtual Machine in the background on the customer's laptop and proceeds to perform JDBC/ODBC mapping onto an unsupported ORACLE shim. To address this issue, AUGSOFT now provides a free ODBCSDK that enables Mac, iPhone, Linux and Windows apps to access genuine Windows-hosted ODBC drivers without third-party ODBC Driver Managers, Control Panels or other components of any kind.
What is ODBCSDK?ODBCSDK is a free drop-in replacement shared-library (DLL) that enables your Mac and PC app to use ODBC drivers installed on a Windows server in place of client-side ODBC control panels, driver managers, drivers and supporting libraries.
Why use ODBCSDK?
Since there are less than a dozen ODBC drivers available on all non-Windows platforms combined, it makes little sense to endure the significant deployment costs, technical support and customer training issues associated with non-Windows ODBC control panels. ODBCSDK eliminates these issues and also enables Windows clients to benefit from centralized administration. ODBCSDK is available for both PHP/PERL type applications on Linux, iPhone, Macintosh and Windows.
How does ODBCSDK work?
Instead of linking your application to an ODBC Driver Manager, you link instead to the compatible ODBCSDK shared library and either specify the network-address of the Customer's Window box (where ODBC Router is installed along side the genuine ODBC drivers for their databases) in the standard ODBC connection string, or supply an /etc/odbcrouter.conf file or a simple "callback routine" that returns the address of the Customer's Windows Server. (On GUI platforms like Mac OS, OS X and Windows, you may even specify "DSN-less" strings to request that ODBCSDK prompt the user with its own "network database chooser".) This eliminates the need for your users to interact with an ODBC control panel and complex driver configuration on each machine in their network, thus reducing your technical support.
Which APIs are implemented by ODBCSDK?
ODBCSDK implements the entire ODBC API with the exception of driver-management calls (which are not needed since the database drivers reside on a centrally managed Windows server), SQLExtendedFetch/SetPos (use a cursor library instead) or the optional 3.X and 4.X API extensions (unnecessary, see docs).
Visit the PHP-ODBC site...
Browse the C Language ODBC Programmer's Reference