Error XS0023 Operator '+' cannot be applied to operand of type 'string'
Posted: Tue Mar 10, 2020 5:55 pm
Code:
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
Error:
Error XS0023 Operator '+' cannot be applied to operand of type 'string'
Why is this not allowed? It is code to construct an SQL statement. Currently it seems the compiler errors only occurs in the statements within a 2nd DO CASE, no error (yet?) after the CASE .. INSERT but error XS00023 for all following cDBFFields += statementof CASE.. Create
Dick
DO CASE
CASE Type="INSERT"
cDBFFields += cFieldquot+cFieldName+cFieldquot +",
CASE cType="CREATE"
DO CASE
CASE cDataType="C"
IF nFieldLen>255
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
ELSE
cDBFFields += "`"+(cFieldName)+"` VARCHAR("+NTrim(nFieldLen) +") NULL "+e","
ENDIF
CASE cDataType="M"
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
CASE cDataType="L"
cDBFFields += "`"+(cFieldName)+"` CHAR(1) NULL "+ e"," // For logic we only store Y or N
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
Error:
Error XS0023 Operator '+' cannot be applied to operand of type 'string'
Why is this not allowed? It is code to construct an SQL statement. Currently it seems the compiler errors only occurs in the statements within a 2nd DO CASE, no error (yet?) after the CASE .. INSERT but error XS00023 for all following cDBFFields += statementof CASE.. Create
Dick
DO CASE
CASE Type="INSERT"
cDBFFields += cFieldquot+cFieldName+cFieldquot +",
CASE cType="CREATE"
DO CASE
CASE cDataType="C"
IF nFieldLen>255
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
ELSE
cDBFFields += "`"+(cFieldName)+"` VARCHAR("+NTrim(nFieldLen) +") NULL "+e","
ENDIF
CASE cDataType="M"
cDBFFields += "`"+(cFieldName)+"` TEXT NULL "+ e","
CASE cDataType="L"
cDBFFields += "`"+(cFieldName)+"` CHAR(1) NULL "+ e"," // For logic we only store Y or N