Refresh quick or some other changes nottification
Posted: Tue 06 Mar 2012 08:46
Hi to all!
I developing multi-tabed-interface that working with MSSQL2008R2. One type of form (document) can be opened manny times / multipe instances and change ih one document must be visibile on other documents /forms. Changes maden on some form in mti application, or changes of other user/comp/client. I refreshing data on adding after posting changes and after delete, and generally on setting form focus/change active form.
TMSChangeNottification doesn't provide support for views and SQL2008, and other important (to me) features. Other suitable solution is RefreshQuick, but this sollution has one big problem - very slow refreshing/fetching when is CheckDeleted set to True (i need check for deletions)
At form is placed 3 queryes.
1.st query is for navigation trough all data in "search grid", it fetching 25 rows, work's only select of 4 fields (GUID-ID, timestamp named synctime, and some attribute fields) and is coupled to datasource and db navigator. It works with cca. 12000 rows selected form view.
2.nd query is for editing. It is coupled to 1.st query (MasterSource and WHERE id = :id in select SQL). It fetching all rows/only one row at time. This sql works with table (that-s part of multi joined view selected in 1.st query). Foreign tables was coupled "mannualy" with tms lookup components, I don't use Delphi's lookup fields or any calculations at fields.
3.rd query is select of all fields and all rows from view (same view from 1.st query, but with all fields, not only 4). opened and used for searching and reporting only when needed (very lov freqention of use).
1.st and 2.nd query was seted key fields to ID (id=pk, guid), all fields are created in fielddef lists, CacheCalcFields = True, CursorUpdate=True, DMLRefresh=True, ReturnParams=True.
I tried ordering on server, and local ordering but with no sucess. My gelerall problem is slowness of RefreshQuick(True). Refreshing with checking deleted, and same refreshing after deleting record's is werry slow. DBMonitor loging statemens in duration in parts of seconds, buth refresh really fetching data from 1.st query take cca. 5 seconds.
I don't use cached updates. I need refreshing of data before after changing, before edit, after delete on own datasets, and refresh of changes on focusing/activating of form. As I Say'd refreshQuick does work, buth werry slow (useless slowly).
Do you have any sugsetion or recomendation for use of RefreshQuick and generally for refreshing changes.
I developing multi-tabed-interface that working with MSSQL2008R2. One type of form (document) can be opened manny times / multipe instances and change ih one document must be visibile on other documents /forms. Changes maden on some form in mti application, or changes of other user/comp/client. I refreshing data on adding after posting changes and after delete, and generally on setting form focus/change active form.
TMSChangeNottification doesn't provide support for views and SQL2008, and other important (to me) features. Other suitable solution is RefreshQuick, but this sollution has one big problem - very slow refreshing/fetching when is CheckDeleted set to True (i need check for deletions)
At form is placed 3 queryes.
1.st query is for navigation trough all data in "search grid", it fetching 25 rows, work's only select of 4 fields (GUID-ID, timestamp named synctime, and some attribute fields) and is coupled to datasource and db navigator. It works with cca. 12000 rows selected form view.
2.nd query is for editing. It is coupled to 1.st query (MasterSource and WHERE id = :id in select SQL). It fetching all rows/only one row at time. This sql works with table (that-s part of multi joined view selected in 1.st query). Foreign tables was coupled "mannualy" with tms lookup components, I don't use Delphi's lookup fields or any calculations at fields.
3.rd query is select of all fields and all rows from view (same view from 1.st query, but with all fields, not only 4). opened and used for searching and reporting only when needed (very lov freqention of use).
1.st and 2.nd query was seted key fields to ID (id=pk, guid), all fields are created in fielddef lists, CacheCalcFields = True, CursorUpdate=True, DMLRefresh=True, ReturnParams=True.
I tried ordering on server, and local ordering but with no sucess. My gelerall problem is slowness of RefreshQuick(True). Refreshing with checking deleted, and same refreshing after deleting record's is werry slow. DBMonitor loging statemens in duration in parts of seconds, buth refresh really fetching data from 1.st query take cca. 5 seconds.
I don't use cached updates. I need refreshing of data before after changing, before edit, after delete on own datasets, and refresh of changes on focusing/activating of form. As I Say'd refreshQuick does work, buth werry slow (useless slowly).
Do you have any sugsetion or recomendation for use of RefreshQuick and generally for refreshing changes.