My experience has been exactly the opposite.
Code: Select all
global lgPropertyTypeID, lgObjectTypeList, lgPropertyTypeList, lgPropertySubTypeList, lgPropertyDetailList
global lgPropertySubTypeArray, lgPropertyDetailArray
global ldgLabelArray, ldgObjectType
the global variable lgPropertySubTypeList is used in this command and works fine without having declared it.
Code: Select all
command createVariousDataContainers pOptionName
local tSql
local tSqlQuery, tConnectionID, tSqlResult, tLoginFailed
put false into tLoginFailed
if GetDataBaseID() is empty then
openDatabase GetPlatformDesc()
end if
put GetDataBaseID() into tConnectionID
switch pOptionName
case "PropertyDetailsType"
put "SELECT * FROM propertydetailstype" into tSqlQuery
break
case "PropertyType"
put "SELECT * FROM propertytype" into tSqlQuery
break
case "PropertySubType"
put "SELECT * FROM propertysubtype" into tSqlQuery
break
end switch
put revDataFromQuery(,,tConnectionID,tSqlQuery) into tSqlResult
if tSqlResult begins with "revdberr" then
put true into tLoginFailed
else
switch pOptionName
case "PropertyDetailsType"
put tSqlResult into lgObjectTypeList
break
case "PropertyType"
put tSqlResult into lgPropertyTypeList
populatePropertyOptionMenu
break
case "PropertySubType"
put tSqlResult into lgPropertySubTypeList
break
end switch
end if
closeDatabase
return tLoginFailed
end createVariousDataContainers