Version 6 of Oratcl Examples

Updated 2004-08-10 00:28:19

Purpose: Accumulate simple examples demonstrating the use of the [ Oratcl ] database library


  • ora2txt performs a select and outputs the results as tab delimited text from a command-line

A simple logon routine

  package require Oratcl

  set lda [oralogon user/pass@dbname -async]
  set sth [oraopen $lda]

  if {[oramsg $sth rc] == 0} {
      puts "Successfully connected"
  } else {
      puts "Unable to connect to the database."
  }

  oralogoff $lda

[Category Example] [Category Database]