Sort By Text

Query / Method

controller.sort(‘package_name Like (“a%”) asc’,‘package_id desc’);

Error

com.servoy.j2db.dataprocessing.DataException: The text, ntext and image data types cannot be compared or sorted except when using IS NULL or LIKE operator

I see two problems here:

  1. you are using a where clause in a sort
  2. you are trying to sort on a non sortable column (it looks like package name is ntext)