I got that error when I am building a menu based on a sqlDataSource with the following SelectCommand:
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
">
However, it works if I add two union statements like below to the end:
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
UNION ALL
SELECT '7', null, '',''
UNION ALL
SELECT '8', '7', '',''
">
The selectcommand eventually will be replaced by a stored procedure and I do not want to fix the problem by manipulating the procedure using dirty tricks like this.
Any ideas? Thanks!!
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
">
However, it works if I add two union statements like below to the end:
SelectCommand="SELECT '1' AS id, null as pid, 'A&SI' AS text, '' as url
UNION ALL
SELECT '2', null, 'P&P',''
UNION ALL
SELECT '3', null, 'T&E',''
UNION ALL
SELECT '4', null, 'FTR',''
UNION ALL
SELECT '7', null, '',''
UNION ALL
SELECT '8', '7', '',''
">
The selectcommand eventually will be replaced by a stored procedure and I do not want to fix the problem by manipulating the procedure using dirty tricks like this.
Any ideas? Thanks!!