proc updateTableName {field table} {
if {[$field getTableHandle] != [$table getCurrentValue]} {
$field setTableHandle [$table getCurrentValue]
$field updateBrowserList
}
return 1
}
proc validateTableFieldPair {table_handle field_handle} {
set table [$table_handle getCurrentValue]
set field [$field_handle getCurrentValue]
if {$table > "" && $field > ""} {
set buffer [GuidoExecServer ValidTableFieldPair [subst {TableName = $table FieldName = $field}]]
if {[ GuidoGetParamBufferValue $buffer status ] >= 0} {
return true
} else {
GuidoMessage warning DB_NO_SUCH_FIELD_ERR $field $table
return false
}
}
return true
}
proc populateFieldBrowser {field table fieldType dataType} {
set buffer [ GuidoExecServer GetFieldList [subst { tablename = "[$table getCurrentValue]" fieldtype = $fieldType datatype = $dataType } ]]
set listOfFields [ GuidoGetParamBufferValue $buffer fieldList ]
eval [concat {$field} {setValues} $listOfFields ]
return 1
}
