I used the Wizard to create a simple search on the Sales Order. There is a Quick Search attached to it. When I run the search I get the following error.
That all looks like the standard boilerplate for an order search except for setting a couple of fields and a call to the changeordernumber() method which should all be fine. I even ran a diff check against one that I have in a working form and it all matched.
Going back to the actual error message, are you 100% sure that the error is coming from this section of code? The whereClause in the code you posted is empty and there’s no additional assignment before the adapter lookup. Also, where is the value of ROCKCHALK coming from? Is that a value from a different field on the order you selected? If so, are you assigning that field to something else like an adapter lookup?
You should share the quick search. It seems there is an issue. Isnt OrderNum an int? If so you cant compare it to a string, but in your error, it shows ROCKCHALK, but it is not surrounded by quotes, strange.