Menu

Tree [f59e6c] master /
 History

HTTPS access


File Date Author Commit
 doc 2004-02-06 Sergey N. Belinsky Sergey N. Belinsky [e1a124] Cleanup build scripts.
 src 2015-08-02 Sergey N. Belinsky Sergey N. Belinsky [f59e6c] Added gitignore files.
 tests 2004-02-18 Sergey N. Belinsky Sergey N. Belinsky [ec2ce0] Rollback to tclsh
 .gitignore 2015-08-02 Sergey N. Belinsky Sergey N. Belinsky [f59e6c] Added gitignore files.
 AUTHORS 2002-12-09 Sergey N. Belinsky Sergey N. Belinsky [8588e7] Added spec file for RedHat based distributions
 COPYING 2002-12-09 Sergey N. Belinsky Sergey N. Belinsky [8588e7] Added spec file for RedHat based distributions
 ChangeLog 2004-02-16 Sergey N. Belinsky Sergey N. Belinsky [3c48e9] Changes in test scripts from tclsh to tcl.
 INSTALL 2002-09-06 Sergey N. Belinsky Sergey N. Belinsky [a393c4] Initial revision
 Makefile.am 2002-12-09 Sergey N. Belinsky Sergey N. Belinsky [8588e7] Added spec file for RedHat based distributions
 NEWS 2004-02-16 Sergey N. Belinsky Sergey N. Belinsky [3c48e9] Changes in test scripts from tclsh to tcl.
 README 2004-02-16 Sergey N. Belinsky Sergey N. Belinsky [3c48e9] Changes in test scripts from tclsh to tcl.
 TODO 2002-09-06 Sergey N. Belinsky Sergey N. Belinsky [a393c4] Initial revision
 acinclude.m4 2002-12-09 Sergey N. Belinsky Sergey N. Belinsky [8588e7] Added spec file for RedHat based distributions
 autogen.sh 2004-02-18 Sergey N. Belinsky Sergey N. Belinsky [6da3f6] Correct return code if fail.
 config.h.in 2004-02-08 Sergey N. Belinsky Sergey N. Belinsky [2cf24a] Added transaction support.
 configure.in 2004-02-19 Sergey N. Belinsky Sergey N. Belinsky [8d9237] New release 0.0.3
 db2tcl.spec.in 2015-08-02 Sergey N. Belinsky Sergey N. Belinsky [26bbae] Changed KOI8-R to UTF-8.
 ibmdb2.m4 2004-02-08 Sergey N. Belinsky Sergey N. Belinsky [2cf24a] Added transaction support.
 mkIndex.tcl.in 2002-12-09 Sergey N. Belinsky Sergey N. Belinsky [8588e7] Added spec file for RedHat based distributions
 tcl.m4 2004-02-16 Sergey N. Belinsky Sergey N. Belinsky [3c48e9] Changes in test scripts from tclsh to tcl.

Read Me

WHAT IS DB2TCL?
===============

DB2TCL is an extension to the Tool Command Language (TCL) that
provides access to a IBM UDB DB2 database server. 

DB2TCL features:
-- supports multiple connections to one or more database servers,
-- supports all IBM DB2 statements,
-- returns SELECT query results either as TCL lists, or iterates
   a script over the resulting rows,
-- supports database transactions.

WHERE TO GET DB2TCL?
====================

http://sourceforge.net/projects/db2tcl/


INSTALLATION
============

Quick install instructions:

- Untar db2tcl tarball
$ tar xzvf db2tcl-X.Y.Z.tar.gz
- Change dir to db2tcl-X.Y.Z
$ cd db2tcl-X.Y.Z
- run configure script
$ ./configure
- run make
$ make
- ckeck
$ make check
- to install switch to root
$ su -c 'make install'


REQUIREMENTS
============

Since DB2TCL is an extension to Tcl, you should already have Tcl, or be
prepared to get it via FTP:

    ftp://ftp.scriptics.com/pub/tcl/

If you want compile Tk interface for IBM DB2 you must have 
Tk library also. 

Of course, you must also have access to a IBM DB2 system. Additionally,
you must have the IBM DB2 SDK package that provides header files and
object libraries. See IBM DB2 homepage:

    http://www-3.ibm.com/software/data/db2/udb/

DB2TCL supports building a dynamic load library on systems that support
dynamic loading.  If you build static libraries and executables, 
I recommend building with Extended Tcl.


BRIEF COMMAND REFERENCE
=======================

db2_connect dbname ?username? ?password?

    Connect to database dbname with username and password. Function
    return database handle.

db2_disconnect db_handle

    Disconnect from database and free database handle.

db2_select db_handle sql_commands

    Execute select SQL command for given handle.
    Return statement handle.

db2_execute db_handle sql_commands

    Execute SQL command a database non-SELECT statement like INSERT,
    DELETE, UPDATE.

db2_bind db2_handle sql_commands varibles

    Bind varibles to data.

db2_fetchrow statement_handle ?number?

    Fetch one row from dataset. If number  is specified, returns a  data
    of this number column.

db2_finish statement_handle

    Finish and free statement handle.

db2_getnumrow statement_handle

    Return number column in statement.

db2_begin_transaction db_handle

    Start transaction

db2_commit_transaction db_handle

    Commit transaction

db2_rollback_transaction db_handle

    Rollback transaction
    
    
NOTE
====

DB2TCL tested only on Linux 2.4.x systems and Solaris 8!

Sergey N. Belinsky
sergeybe@users.sourceforge.net