Hi All,
I'm developing a C++ application using OLEDB to communicate to SQL Server Compact Ed. 3.5. One feature of my application is a filter that helps the user narrow down data.
Unfortunately, the selection criteria for the filter may become quite complex as the user may select data associated with various countries, keywords, categories, rating, etc.
Writing a SQL statement conveying the filter settings makes me nervous as such a statement may be quite long. As SQL Compact Ed. does not support views and stored procedures, one viable solution I thought of is to apply a sub-set of the filter settings (via a shorter SQL statement) and populate a temporary table with the results. Similarly, I would continue applying filter settings to this temporary table until I would get to my final results. Unfortunately, this may require quite a little bit of space depending on the filter settings. Sure, there's always the possibility of informing the user that the filter settings would return too many results and require him or her to re-think the filter but I would like to avoid this situation if at all possible. Is this solution the only one in my situation ? Any other ideas ?
Thanks!