bBrowser and SQL delay question

73 views
Skip to first unread message

Stavros Spanos

unread,
Mar 4, 2022, 10:19:33 AMMar 4
to
Hi all!!

We are using a data bounded bBrowser connected with a VO SQLTable that handles a lot of data, code blocks etc.

When we are moving from row to row (with mouse or keys), it seems that a data refreshing is going on, concerning the current record (actually the records seems to be re-read from original SQL Server when we move to it).

This of course is very nice, but causes a delay of 2-3 second while we are browsing.

We have 2 questions:

• Is there a way to work more asynchronously? We need to browse without any interaction with the server and <Refresh All> when needed. Is there a way to do this?

• Is there a – kind of – “granularity” concerning thw interaction between SQL Server / SQLTable / bBrowser?? It seems like the problem gets worse with Tables with 50000-100000 rows.

Thanks in advance!

Jamal

unread,
Mar 4, 2022, 4:53:47 PMMar 4
to
Make sure bBrowser:AutoRefreshTime = 0

and bBrowser:ServerType set to #SQL.

From the docs: The bBrowser optimizes the access to the data server
depending on the server type.

Jamal

Stavros Spanos

unread,
Mar 8, 2022, 3:59:22 AMMar 8
to
Thanks for the reply Jamal!

Unfortunatelly we do not need an Autorefresh(off). It is anyway by default. Our problem is that the bBrowser autamatically re-reads the current record from the SQLTable every time the current row changes (f.e. when clicking another row).

We want this behaviour to stop because it leads to 2-3 seconds delay, something that confuses the user when browsing. So in a way we need to make the bBrowser work like "disconnected" to the Server.

Stavros

Stefan Ungemach

unread,
Mar 8, 2022, 7:48:56 AMMar 8
to
Have you tried working with a timer? I.e. overwriting bBrowser:Notify, redirect NOTIFYRECORDCHANGE to some killtimer/settimer construct and calling super:Notify() via the Dispatch method of your subclassed bBrowser (for the appropriate WM_TIMER message). That would decouple all internal logic for a moment. Problem is the refresh of the selection, but you could at least start playing around in that direction.

dlzc

unread,
Mar 8, 2022, 10:47:52 AMMar 8
to
On Friday, March 4, 2022 at 8:19:33 AM UTC-7, stavros...@gmail.com wrote:
> Hi all!!
>
> We are using a data bounded bBrowser connected with a VO SQLTable that
> handles a lot of data, code blocks etc.
>
> When we are moving from row to row (with mouse or keys), it seems that
> a data refreshing is going on, concerning the current record (actually the
> records seems to be re-read from original SQL Server when we move to it).

Load the displayed fields, and a record number in a short table / array. Browse the "static" table, rather then the full DBF, record by record. Only call SQL to load / reload the table, when delays are expected. Do not allow editing of a record in the columnar display (unless you want to handle that).

"Doctor, it hurts when I do this!"

David A. Smith

Jamal

unread,
Mar 8, 2022, 12:59:23 PMMar 8
to
Try using bBrowser:SuspendNotification() in the PostInit() method, then
when you want to refresh, issue bBrowser:ResestNotification(), then
bBrowser:Refresh(), then suspend again.

Since notification calls are stacked, you may want to keep track via a
variable if SuspendNotification is still active, because on Window
close, you need to ResetNotification.

HTH,
Jamal
Reply all
Reply to author
Forward
0 new messages