I have already tried that but it is not working.
Thanks for your suggestion with example code.
Can you please advise how we get the data using this Search Method, because you did not write any return statement.
As per your suggestion, I have changed the query and it is working fine.
But I have to implement direction of sorting dynamically and it is not working. Please give your expert advise.
In below code, bold highlighted not working and give me compile time error.
select * from (
SELECT TOP ALL FirstName, MiddleName, LastName, Email, UserType
WHERE (ISNULL(:objSearch.FirstName, '') = '' OR FirstName LIKE :objSearch.FirstNameSearch)
AND (ISNULL(:objSearch.LastName, '') = '' OR LastName LIKE :objSearch.LastNameSearch)
AND (ISNULL(:objSearch.Email, '') = '' OR Email LIKE :objSearch.EmailSearch)
-- Order by :objSearch.SortingField
WHEN 'FirstName' THEN FirstName
WHEN 'MiddleName' THEN MiddleName
WHEN 1 THEN DESC
WHEN 0 THEN ASC
WHERE %vid BETWEEN :objSearch.StartIndex AND :objSearch.EndIndex
object property is working fine in Query expect objSearch.SortingField
When I have written last 4 lines instead on 5 lined in ClassMethod than my issue was resolved. But I have to write those 4 lines in all ClassMethod. Do you know any other place, where I put these 4 common lines and it will work for all ClassMethods.
Thanks for you more support in advance.
Log in or create a new account to continue