Purpose: Discuss the Tcl <-> Oracle DBMS binding http://oratcl.sf.net/ is the home page for this package binding Oracle to Tcl. Insert your favorite Oratcl tips, tricks, and hints, etc. here. Also, point to various useful reading, such as [BOOK Tcl/Tk Tools], or [BOOK Oracle and Open Source]. "Cinderella languages" [http://sw.itworld.com/swol-08-1999/swol-08-regex.html] is a published article on Oratcl's origins. [Tom Poindexter] created Oratcl. [Todd M. Helfter] currently maintains it. Tom Poindexter's Oratcl page http://www.nyx.net/~tpoindex/tcl.html has a little bit about Oratcl, but the primary work on the extension is being done by Todd via the [SourceForge] project. ---- Also add here information about tips for managing [Unicode], images, etc. from within Oracle tables. ---- Todd points out that, "OraTcl relies on the Oracle install. This means different things on different platforms. On Unix, the ORACLE_HOME environment variable must point to a valid Oracle install. On windows, the ociw32.lib file must be found in the WINDOWS search path. In the past, I have had to place the oracle directory in the windows PATH variable in autoexec.bat. In later releases, the registry information was sufficient to find the file." ---- Tcl has other connections to [COMPANY: Oracle]. ---- [tksql] is an application for editing [PostgreSQL] (''not'' Oracle) tables. ---- [LV] For which version of Oratcl is this template - I seem to recall that at version changes, the paradigm used by oratcl programs had to change... A recent article on comp.lang.tcl by [Kevin Rodgers] asked for comments about this sample boilerplate: # For error reporting: set program [file tail $argv0] # Package interface: package require Oratcl # Connect to the $env(TWO_TASK) database as USER with PASSWORD: if [catch {oralogon "USER/PASSWORD"} ora_logon] { puts stderr "$program: $ora_logon" exit 1 } if [catch {oraopen $ora_logon} ora_statement] { oralogoff $ora_logon puts stderr "$program: $ora_statement" exit 1 } #if [catch {oraconfig $ora_statement fetchrows 1024} ora_error] { # puts stderr "$program: $ora_error" #} # Execute SQL statement: set sql "SELECT column_1, ... column_N FROM ... WHERE ..." # Note that for Oratcl 4.x, the $oramsg references have to change to # [oramsg $ora_statement rc] if [catch {orasql $ora_statement $sql} ora_error] { puts stderr "$program: $ora_error" } elseif {$oramsg(rc) != 0} { puts stderr "$program: $oramsg(errortxt)" } else { # Process each row with column_I bound to var_I: while {$oramsg(rc) == 0} { if [catch {orafetch $ora_statement \ {... $var_1 ... $var_N ...} \ '@' var_1 1 ... var_N N} \ ora_error] { puts stderr "$program: $ora_error" break } elseif {$oramsg(rc) == 1403} { break } elseif {$oramsg(rc) != 0} { puts stderr "$program: $oramsg(errortxt)" break } } } # Disconnect from the $env(TWO_TASK) database: if [catch {oraclose $ora_statement ora_error] { puts stderr "$program: $ora_error" } if [catch {oralogoff $ora_logon ora_error] { puts stderr "$program: $ora_error" } ---- [[ [Category Package] | [Category Database] ]]