proc validateconnectionstring { connectstr } {
if { ( [string first "dsn" "$connectstr"] == -1 ) && ( [string first "DSN" "$connectstr"] == -1 ) } {
GuidoMessage warning DB_ODBC_IMPROPER_CONNECTSTR
return 0
} else {
return 1
}
}
proc warningMsgCallback { valfield field } {
set value [$valfield getCurrentValue]
if { $value == "access2010" || $value == "access2007" || $value == "access" } {
$field setVisible true
} else {
$field setVisible false
}
}
GuidoForm frm10020 {
-default_buttons
-label "Choose Database Type"
-tip 10020_TIP_0
GuidoLabel frm10020_2 {
-label "Database Name"
}
GuidoLabel dbname {
-no_mlt
}
GuidoLabel frm10020_3 {
-label "Database Type"
}
GuidoComboBox dbtyp {
-display_length 13
-format none
-max_length 10
-no_mlt
-tip CREATE_DATABASE_TYPE_TIP
-action valueChanged {[warningMsgCallback $dbtyp $Overwrite_Label]}
}
GuidoLabel Overwrite_Label_space {
-visible false
}
GuidoLabel Overwrite_Label {
-label DB_SURPAC_COMP_WARNING
}
GuidoLabel frm10020_2 {
-label "ODBC connect string"
}
GuidoField odbc_str {
-validation {[ validateconnectionstring [$odbc_str getCurrentValue] ]}
-dependency {"[ $dbtyp getCurrentValue]" == "odbc"}
-display_length 25
-format none
-max_length 100
-tip 10020_TIP_2
-translate none
}
GuidoPanel frm10020_8 {
-label ""
-layout BoxLayout X_AXIS
-tip 10020_TIP_3
GuidoButtonGroupPanel xyzcal {
GuidoRadioButton frm10020_6 {
-caption STORED
-selected_value STORED
}
GuidoRadioButton frm10020_7 {
-caption CALCULATED
-default true
-selected_value CALCULATED
}
}
GuidoLabel frm10020_4 {
-label "y x z survey and sample co-ordinates"
}
}
}
