Version 30 of ODBC

Updated 2004-03-07 15:12:55

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).


 What: PostgreSQL
 Where: http://www.postgresql.org/
        http://www.ids.net/%7Ebjepson/freeODBC/
        http://www.openlinksw.com/
        http://www.demon.co.uk/finder/postgres/
        http://www.ucolick.org/%7Ede/tcl_syb/wisql.html
        ftp://rocker.sch.bme.hu/pub/mirrors/postgreSQL/
        http://www.illustra.com/
        http://aldev.8m.com/
        http://aldev.webjump.com/
        http://www3.bcity.com/aldev/
        ftp://ftp.redhat.com/
        http://www.pgsql.com/
        http://www.askesis.nl/AskesisPostgresIndex.html
        http://members.spree.com/technology/aldev/
        http://field.medicine.adelaide.edu.au/%7Ecolin/libtclpq/
        ftp://field.medicine.adelaide.edu.au/pub/libtclpq/libtclpq.tgz
 Description: PostgreSQL is a derivitive of POSTGRES 4.2, converted to ANSI C.
        POSTGRES is a database management system.  It is compliant with
        ANSI SQL92 and SQL89.  It supports a number of enhancements,
        such as inheritance, declaritive queries, optimization,
        concurrency control, transactions, mult-user support, user defined
        operators, types, functions, and access methods.
        APIs exist for C, C++, Java, Perl4, Perl5, Python, SQL and Tcl.
        Free versions of drivers for ODBC and JDBC are under development.
        A commercial version of PostgreSQL is available via Illustra, Inc.
        The most recent version is 6.4.2-5.
 Updated: 04/1999
 Contact: mailto:[email protected] (PostGres95 mailing list)

 What: tcl dbi
 Where: http://rrna.uia.ac.be/dbi/
 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: 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)

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


Category Acronym | Category Package | Category Database