DCBROWSE and SQL Express Browsefilter

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

DCBROWSE and SQL Express Browsefilter

#1 Post 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.)
Attachments
Poslat.zip
(1.07 MiB) Downloaded 675 times

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCBROWSE and SQL Express Browsefilter

#2 Post 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.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: DCBROWSE and SQL Express Browsefilter

#3 Post 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.

Post Reply