I have some code that I am converting that use to be all & for concatenation of strings, moving to smart strings and was wondering what was best
In the second part of this building the SQL statement I use a & to and on the 2nd part of the string
OR
Maybe me wonder should I just put the first part of the command in the smart string as well?
Just wondering
In the second part of this building the SQL statement I use a & to and on the 2nd part of the string
B4X:
mSQLStatement = $"DELETE FROM ${DEFINE_DB_TiesTableName} where ${DEFINE_DB_TagTiesFWID} = ${FWID}"$
If FWTypeID > 0 Then
mSQLStatement = mSQLStatement &$" and ${DEFINE_DB_TagTiesFWTypeID} = ${FWTypeID}"$
End If
OR
Maybe me wonder should I just put the first part of the command in the smart string as well?
B4X:
mSQLStatement = $"DELETE FROM ${DEFINE_DB_TiesTableName} where ${DEFINE_DB_TagTiesFWID} = ${FWID}"$
If FWTypeID > 0 Then
mSQLStatement = $"${mSQLStatement} and ${DEFINE_DB_TagTiesFWTypeID} = ${FWTypeID}"$
end if
Just wondering