Version 5 of Oratcl Examples

Updated 2004-08-09 19:58:59

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]

  set sql {select CUSTOMER_NAME from TICKETS}

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

  oralogoff $lda

[Category Example] [Category Database]