home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
dbcorpdrop.tcl
< prev
next >
Wrap
Text File
|
1997-05-22
|
2KB
|
54 lines
#---------------------------------------------------------------------------
#
# Copyright (c) 1996 by Cayenne Software Inc.
#
# This software is furnished under a license and may be used only in
# accordance with the terms of such license and with the inclusion of
# the above copyright notice. This software or any other copies thereof
# may not be provided or otherwise made available to any other person.
# No title to and ownership of the software is hereby transferred.
#
# The information in this software is subject to change without notice
# and should not be construed as a commitment by Cayenne Software Inc.
#
#---------------------------------------------------------------------------
#
# File : %W%
# Author : edri
# Original date : 16-9-1996
# Description : dbserver script to drop a database.
#---------------------------------------------------------------------------
proc finish {code file result} {
if {$code == 0} {
puts $file OK
} else {
puts $file ERROR
}
puts $file $result
close $file
exit $code
}
set resultFile [lindex $argv 0]
if {$resultFile == ""} {
puts stderr "No result file as first argument specified."
exit 1
}
if [catch {set file [open $resultFile w]} error] {
puts stderr $error
exit 1
}
if {[llength $argv] != 2} {
finish 1 $file "Usage: dbcorpdrop.tcl <resultFile> <databaseName>"
}
db name [lindex $argv 1]
if [catch {db drop} error] {
finish 1 $file $error
}
finish 0 $file "done"