Version 43 of ODBC

Updated 2012-09-10 14:46:41 by LkpPo

Purpose: discuss Open Database Connectivity (ODBC) and its connection to Tcl.

http://www.dataaccess.com/ChangePage.asp?PageCode=SUP_G_26WP appears to be a technical overview white paper on ODBC.

Short overview

ODBC is a database API. It uses SQL for the actual queries. It is an implementation of the standard SQL/CLI API. [Note: ODBC itself does not contain any networking functions, that is a common misunderstanding. Individual database drivers often do, though.]

The best known ODBC implementation is the one by Microsoft that comes with Windows, but MacOS X also comes with its own implementation since version 10.2 and there are several implementations on other Unixes and Linux.

ODBC implementations consist of a middleware layer with which applications link and a driver layer that is implemented by individual database drivers. In addition the middleware layer implements a configuration repository (often with a GUI) where the drivers are configured and where so-called "data sources" can be defined.

A data source is a database access definition. Such a data source commonly contains the hostname, database instance name and sometimes user and password. While such database access parameters can be used by the applications directly, it is usually easier to setup a data source and have the application only specify the data source name (DSN).


  • Helga - Reduce code length and complexity for applications mixing CGI HTML, ODBC, and Tcl.
  • moodss - The Modular Object Oriented Dynamic SpreadSheet.
  • odbcisql - Windowing SQL processor for ODBC connected databases.
  • extension to SOLID database server
  • odbctcl
  • pgsql - Enhanced interface library to Postgresql 6.0 backend.
  • PostgreSQL - A database management system.
  • SnODBC - An extension providing access to ODBC 3.0 API in tclodbc-like manner.
  • TclSQL - Yet another generic (Microsoft Windows Only) ODBC extension for reading,inserting,updating, and deleting records from a database.
 What: tcl dbi
 Where: http://tcl-dbi.sourceforge.net/
 Description: Generic Tcl interface for accessing different SQL databases.
        Presents a generic API to open/query/change databases.  Currently
        supports Interbase, Postgres, and ODBC, but is written in a way
        that makes it possible to add other back ends.
 Updated: 03/2002
 Contact: mailto:[email protected]

 What: TclDBI
 Where: From the contact
 Description: Based on the MODDBC project, contact has put the code
        into a namespace, updated the drivers, added a driver for ODBC.
        It also supports Postgres, Sybase, and msql.
 Updated: 09/2000
 Contact: mailto:[email protected]

 What: Tclodbc (bgi-sa)
 Where: http://www.bgi-sa.com/
 Description: Tcl to ODBC interface in dll form for win95/NT. Works with Tcl 8.0
        A sample query wizard using both tclwin and tclodbc is provided.
 Updated: 12/1998
 Contact: mailto:[email protected] (N.Frankinet)

 What: Tclodbc (nurmi)
 Where: http://sf.net/projects/tclodbc/
        http://jfontain.free.fr/tclodbc-2.2.1-1.i386.rpm
        http://jfontain.free.fr/tclodbc-2.2.1-1.spec
        http://www.solagem.fi/%7Ernurmi/tclodbc.html
        http://www.solagem.fi/%7Ernurmi/tclodbc.zip
        http://www.ccp.uchicago.edu/%7Esteva/mactclodbc
        http://www.tcl.tk/software/tcltk/netcvs.html
        http://www.google.com/search?q=site%3Atcl.tk+tclodbc
        http://www.unixodbc.org/
 Description: Object oriented ODBC database interface for Tcl.
        Supports multiple simultaneous connections, transaction
        handling, precompiled SQL statements and SQL argument
        handling.  As of 2.1, supports Tcl 7.6, 8.0 and 8.1.  When
        using Tcl 8.1, Unicode support is available.  The
        version 8.1 DLL also supports Tcl 8.2.
        The uchicago site is a port of the extension to MacTcl.
        Currently at v2.1.
 Updated: 11/2001
 Contact: mailto:[email protected] (Roy Nurmi)
        mailto:[email protected] (Steve Aronson)

 What: tclodbc (thomas)
 Where: From the contact
 Description: Contact porting a portion of tclodbc to use the CLI interface
        to DB2.  He stopped work on it once he got things to work
        for himself.
 Updated: 07/1999
 Contact: mailto:[email protected] (Vince Thomas)

 What: tclsql (snichols)
 Where: http://sourceforge.net/projects/tclsql
 Description: Microsoft Windows ODBC C++ based Tcl extension. 
 Exposes C based ODBC functions to Tcl using Tcl's C based API. 
 This extension has been tested heavily with SQL Server 2000, 
 but should work with most DBMS applications that support ODBC.
 Updated: 11/2004


 What: Windows NT Extensions Set
 Where: http://zazu.maxwell.syr.edu/nt-tcl/
        ftp://ftp.maxwell.syr.edu/tcl/tcl82/nt-tcl82.zip
        ftp://ftp.maxwell.syr.edu/pub/tcl/stubs/nt-tcl82stubs.zip
        http://www-personal.umich.edu/%7Espencer/guraldi/gdtcl.html
        ftp://ftp.maxwell.syr.edu/pub/tcl/tcl76/ntext-prelim.zip
 Description: Extensions specifically for managing x86 Windows NT.  The
        ntsys extension handles adding, enumerating and deleting users,
        local and global groups, retrieving user account info, retrieving,
        modifying and setting file and directory permissions.
        The ODBC extension provides basic support.
        The registry extension is a port of Gordon Chaffee's work in TkNT with
        some enhancments.
        The gdtcl is a port of gdtcl and gd for doing GIF creation and
        manipulation.  The gdtcl extension includes a safe entry point and
        thus can be used with the Tcl plugin.
        tclping provides access to the icmp echo protocol.
        shortcut is an extension to create and maintain Windows 95/NT
        shortcuts.
        The entire package has been built with MSVC++ 5.0.
        The author mentions that none of these have been tested with
        Windows 95.  Some may work - the NT specific ones obviously won't.
 Updated: 09/1999
 Contact: mailto:[email protected] (Christopher M. Sedore)

 What: TclODBC
 Where: http://freshmeat.net/projects/tclodbc/
        http://freshmeat.net/redir/tclodbc/66305/url_tgz/TclODBC-0.0.tar.gz
        ftp://ftp.deepsoft.com/pub/deepwoods/Other/TclODBC-0.0.tar.gz
 Description: A UNIX/Linux based re-write of the tclodbc package.  It is in plain C (not C++) and
        uses SWIG to generate an OO interface layer for Tcl.
 Updated: 09/10/2006
 contact mailto:[email protected] (Robert Heller) http://www.deepsoft.com/

See also Tclodbc, Excel, Database Interface, Interacting with databases .


Category Glossary | Category Package | Category Database