I'm trying to use the DNN SQL DataSource in 2sxc's VisualQuery Designer to retrieve and display information from SQL in a 2sxc App. However, when I try to input my SQL query and click 'Save', a 403 error is displayed. I was unable to find the 2sxc error log. Is there something wrong with my SQL query? How can I get the datasource to accept my query?
SQL Query:
Note: some values have been modified for privacy.
SELECT Description, CanonicalURL,
(CASE WHEN CanonicalURL LIKE '/abc/%' THEN CanonicalURL ELSE (SELECT TOP 1 Replace(TabPath, '//', '/') FROM Tabs WHERE TabName = PageName AND TabPath LIKE '//abc//%') END) AS 'abc',
(CASE WHEN CanonicalURL LIKE '/def/%' THEN CanonicalURL ELSE (SELECT TOP 1 Replace(TabPath, '//', '/') FROM Tabs WHERE TabName = PageName AND TabPath LIKE '//def//%') END) AS 'def',
(CASE WHEN CanonicalURL LIKE '/ghi/%' THEN CanonicalURL ELSE (SELECT TOP 1 Replace(TabPath, '//', '/') from Tabs WHERE TabName = PageName AND TabPath LIKE '//ghi//%') END) as 'ghi'
FROM
(SELECT DISTINCT s.Description, Replace(TabPath, '//', '/') + '/' + PageName as 'CanonicalURL', PageName
FROM [dbo].[My_Series_Tabs] cst
JOIN My_SeriesContent s ON cst.SerieID = s.SeriesID
JOIN Tabs t ON t.TabID = cst.tabID
WHERE PageName IS NOT NULL AND TargetCanonicalURL = 1 AND TabPath NOT LIKE '%translated%' AND CultureCode = 'en-US') allseries
403 Error
Had an error talking to the server (status 403)
Saving happens as API calls and you should be able to see them in the insights logs. Best check that and post the lines where it errors here, so we can help more.