There is only one database in the SQL Server, ODBC 8.0.
The "CASE" statement appears to be the problem. Works in the SQLTester, not in program as a string or constant in a text file.
In WebApp.src:
Object oSQLExecutor is a cSQLExecutor
Move Self to ghoSQLExecutor
Set psConnectionId to "MrLoadID"
End_Object
In the view:
Include_Text BillInfoList.sql as C_SQLBillInfoList
BillInfoList.sql contains:
SELECT Name, M_Addr, M_City, M_St, M_Zipcode
FROM BillInfo
WHERE M_City = ${City} AND M_St = ${State}
ORDER BY M_St, M_City
This works as a string and in the text file:
Send SQLPrepare of ghoSQLExecutor C_SQLBillInfoList (or sQuery when testing as a string)
Send SQLSetParameter of ghoSQLExecutor "City" sCity
Send SQLSetParameter of ghoSQLExecutor "State" sState
Get SQLExecute of ghoSQLExecutor to aTheRows
This works in the SQLTester but not in the program as a string or from the text file:
SELECT Name, M_Addr, M_City, M_St, M_Zipcode
FROM BillInfo
WHERE CASE
WHEN ${State} <> '' THEN M_City = ${City} AND M_St = ${State}
END
ORDER BY M_St, M_City