I have a form where users can search for results by date, keyword, type, etc. this has worked fine for weeks, but just recently stopped working. now, sometimes it works fine, but for certain search terms, it gives the following error.
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot sort a row of size 8224, which is greater than the allowable maximum of 8094.
the date uploaded last week was not any bigger than previous week's data.
does anyone have any idea why this isn't working?
if it helps, this is the sql statement.
if refer = "searchHP" then
ssQL = "SELECT * FROM tblEvents LEFT JOIN tblClient ON tblEvents.ClientID = tblClient.ClientID LEFT JOIN tblAuctionAd ON tblEvents.OrderID = tblAuctionAd.OrderID WHERE EventDate > getdate()"
if statecode <> "" then
sSQL=sSQL & " AND tblEvents.StateID = '" & statecode & "' "
end if
if eType <> "" then
sSQL=sSQL & " And Type = '" & eType & "' "
end if
if keywords <> "" then
sSQL=sSQL & " AND (Title LIKE '%" & keywords & "%' OR Organizer LIKE '%" & keywords & "%' OR tblEvents.Location LIKE '%" & keywords & "%' OR tblEvents.Description LIKE '%" & keywords & "%' OR tblClient.ClientName LIKE '%" & keywords & "%' OR tblAuctionAd.AdText LIKE '%" & keywords & "%') "
end if
if monthparam > 0 and dayparam = 0 then
sSQL=sSQL & " AND Month(EventDate) = " & monthparam & " "
end if
if dayparam > 0 and monthparam > 0 then
sSQL=sSQL & " AND Month(EventDate) = " & monthparam & " AND " & dayparam & " = day(EventDate) "
end if
end if
sSQL = sSQL & " ORDER BY EventDate"
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot sort a row of size 8224, which is greater than the allowable maximum of 8094.
the date uploaded last week was not any bigger than previous week's data.
does anyone have any idea why this isn't working?
if it helps, this is the sql statement.
if refer = "searchHP" then
ssQL = "SELECT * FROM tblEvents LEFT JOIN tblClient ON tblEvents.ClientID = tblClient.ClientID LEFT JOIN tblAuctionAd ON tblEvents.OrderID = tblAuctionAd.OrderID WHERE EventDate > getdate()"
if statecode <> "" then
sSQL=sSQL & " AND tblEvents.StateID = '" & statecode & "' "
end if
if eType <> "" then
sSQL=sSQL & " And Type = '" & eType & "' "
end if
if keywords <> "" then
sSQL=sSQL & " AND (Title LIKE '%" & keywords & "%' OR Organizer LIKE '%" & keywords & "%' OR tblEvents.Location LIKE '%" & keywords & "%' OR tblEvents.Description LIKE '%" & keywords & "%' OR tblClient.ClientName LIKE '%" & keywords & "%' OR tblAuctionAd.AdText LIKE '%" & keywords & "%') "
end if
if monthparam > 0 and dayparam = 0 then
sSQL=sSQL & " AND Month(EventDate) = " & monthparam & " "
end if
if dayparam > 0 and monthparam > 0 then
sSQL=sSQL & " AND Month(EventDate) = " & monthparam & " AND " & dayparam & " = day(EventDate) "
end if
end if
sSQL = sSQL & " ORDER BY EventDate"