I used this in my ORDER BY expression box in the repeater and received this error. Also, there will be an undetermined number of articles. I need to bring back all of them, not just 9 (I used that as an example)
DocumentPublishFrom DESC from above OFFSET (1) ROWS FETCH NEXT (9) ROWS ONLY
nvalid SQL query in property "orderby".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Invalid SQL query in property "orderby".
Source Error:
Line 209: get
Line 210: {
Line 211: return DataHelper.GetNotEmpty(GetValue("OrderBy"), repItems.OrderBy);
Line 212: }
Line 213: set
Source File: C:\Sites\val.vitalant.org\server\CMS\CMSWebParts\Viewers\Documents\cmsrepeater.ascx.cs Line: 211
Stack Trace:
[InvalidOperationException: Invalid SQL query in property "orderby".]
CMS.PortalEngine.Web.UI.CMSAbstractWebPart.GetValueInternal(String propertyName, Boolean resolveMacros) +1636
CMSWebParts_Viewers_Documents_cmsrepeater.get_OrderBy() in C:\Sites\val.vitalant.org\server\CMS\CMSWebParts\Viewers\Documents\cmsrepeater.ascx.cs:211
CMSWebParts_Viewers_Documents_cmsrepeater.SetupControl() in C:\Sites\val.vitalant.org\server\CMS\CMSWebParts\Viewers\Documents\cmsrepeater.ascx.cs:909
CMSWebParts_Viewers_Documents_cmsrepeater.OnContentLoaded() in C:\Sites\val.vitalant.org\server\CMS\CMSWebParts\Viewers\Documents\cmsrepeater.ascx.cs:880
CMS.PortalEngine.Web.UI.CMSWebPartZone.OnContentLoaded() +158
CMS.PortalEngine.Web.UI.CMSAbstractLayout.OnContentLoaded() +165
CMS.PortalEngine.Web.UI.CMSAbstractLayout.LoadWebPartsContent(Boolean reloadData) +305
CMS.PortalEngine.Web.UI.CMSAbstractLayout.LoadContent(PageInfo pageInfo, Boolean reloadData, Boolean allowOrphanedZones) +875
CMS.PortalEngine.Web.UI.CMSPagePlaceholder.LoadContent(PageInfo pageInfo, Boolean reloadData) +1936
CMS.PortalEngine.Web.UI.CMSPagePlaceholder.LoadContent(PageInfo pageInfo, Boolean reloadData) +2749
CMS.PortalEngine.Web.UI.CMSPortalManager.LoadPage(Boolean reloadData) +233
CMS.PortalEngine.Web.UI.CMSPortalManager.PageHelper_InitComplete(Object sender, EventArgs e) +29
CMS.Base.Web.UI.PageContext.CurrentPage_InitComplete(Object sender, EventArgs e) +277
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnInitComplete(EventArgs e) +11849993
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +535