Page 1 of 1

DCBROWSE and SQL Express Browsefilter

Posted: Wed Mar 01, 2017 3:48 am
by Victorio
Hi,
I am here again :) with same problem, when browsing Foxpro DBF with SQL via ODBC Driver Visual Foxpro.

Problem is, when create dataset, and then realise Browsefilter, , when browse table, everything is correct filtered, but :
1. cannot skip row down
2. when scroll with mouse scroll up, then browsing same rows x times.

Where can be problem ?

When filter data via SELECT statement, then browsing is OK.

When problem is not with DCBROWSE, then I thing some problem with SQL processing records (maybe forward only cursor or I do not know what.)

Re: DCBROWSE and SQL Express Browsefilter

Posted: Wed Mar 01, 2017 8:00 am
by rdonnay
I don't trust the ODBCDBE to always handle browse navigation correctly when using filtering.

I stopped using filtering about 20 years ago.

Why do you need to apply filters?
Could you use the SQL WHERE clause instead?

I worked on a VFP conversion that had filtering requirements in which the user selects various filtering of the SQL cursor.
In this case, the WHERE clause was not acceptable because the view needed to change quickly every time a new sub selection was made.
I learned very quickly that the best way to manage the browse was to do the following:

1. Apply the SQL SELECT statement to acquire the SQL cursor.
2. Load a multi-dimensional array with the entire cursor and then close the cursor.
3. Use @ .. DCBROWSE to browse the array.
4. Use the FILTER clause of @ .. DCBROWSE to manage the filtering. This works much better and is very fast.

Working with arrays in Xbase++ is very fast.

Re: DCBROWSE and SQL Express Browsefilter

Posted: Wed Mar 01, 2017 11:38 am
by Victorio
Roger:
I have to try, thanks for the advice.
I was worried if load cursor to array do not need more big part of memory, but it can be same, as space used with SQL dataset.