DC_DbNotify()

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

DC_DbNotify()

#1 Post by unixkd »

What are the examples of time consuming database operations. is DBSetFilter() one of them ? When I set a complex filter on a large table, I want to know when the filtering is completed.

DBO_BULK_REQUEST Time consuming database operation begins
DBO_BULK_COMPLETE Time consuming database operation ends

Thanks

Joseph

User avatar
Tom
Posts: 1171
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DC_DbNotify()

#2 Post by Tom »

Hi, Joseph.

DC_DbNotifiy is a sample for DbRegisterClient() of Xbase++, which is a method to connect objects to workarea notifications. Look at "DbRegisterClient" of your Xbase++-documentation.

If you set a filter for a database/workarea, at least nothing happens. DbSetFilter() oder SET FILTER TO only create filters. If you navigate inside the workarea (i.e. using DbGotop(), DbSkip() a.s.o.), the filter impression is evaluated with each record pointer movement - like if you manually skip the table and check for the filter condition everytime. Filters may be very time consuming, depending on their complexity, the size of the tables, used functions (full text search inside memo fields), the number of indexes and so on, the hardware and network connections. But filters can be very fast. However, filtering is "completed" right behind the navigation command:

SET FILTER TO "Joseph" $ name // nothing happens, filter is established
DbGoTop() // filter is evaluated NOW
IF Eof() // filtering for the first record is completed

The time between DbGoTop() and IF is the time needed for filtering (of the first record).

SET FILTER is not the same as "SELECT FROM" which you may know from SQL. SELECT-statements return record sets. A filter just sets a condition for the workarea navigation.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply