home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: %W%
- # Author: Harm Leijendeckers
- # Description: Upgrade tools
- #
- #---------------------------------------------------------------------------
- # SccsId = %W% %G% Copyright 1996 Cadre Technologies Inc.
-
-
- # SQL server version
- # It does nothing with 'beforeFieldName' because in sql server you can't
- # specify before which field you want to add the new field.
- proc add_field { tableName fieldName fieldType { beforeFieldName "" } } {
- catch {
- db query "alter table $tableName"
- db query "add $fieldName $fieldType null"
- db run
- }
- return
- }
-
-
- proc gen_obid { className tableId } {
- return [OBID::newId $className [get_implId] 1 $tableId]
- }
-
-
- proc get_implId {} {
- global implId
- if ![info exists implId] {
- db select c_id
- db from corporate0
- set corpId [db run]
- set implId [lindex [OBID::decode $corpId] 1]
- }
- return $implId
- }
-
-
- proc get_projects {} {
- db select c_name
- db select c_id
- db select c_tableid
- db from project0
- return [db runLoop]
- }
-
-
- proc get_release {} {
- db select c_release
- db from corporate0
- return [db run]
- }
-