I have a problem with live cursor and AdsQuery.Refresh

If a user adds a record in a table (customers), if other users are doing a refresh of the query then the record appears. Here is the query:


But for sales orders that does not work, the refresh does not display the new lines, the query must be a close and open (which is live). Here is the query:


Is it because the order by is composed of fields of different types (CHAR and INTEGER)?

If at the time of refresh, I bind the table GCMD to the query by the datasource, the new record is displayed, but my query is configurable, so I can not link a table.

Do you have any idea where is the problem?

asked 08 Aug '14, 06:09

mgr's gravatar image

accept rate: 0%

edited 08 Aug '14, 07:35

Mark%20Wilkins's gravatar image

Mark Wilkins

I suspect that the difference is that the CUSTOMER table has an existing index on IDENTIFICATION. When another user adds a record to that table, that index is automatically updated. When the first user refreshes the grid or scrolls through the data, it will use the modified index and the new record would be visible.

[Assumption: The newly added record in the second table meets the WHERE clause condition.] If the assumption is true, then there probably is not an existing index on the fields JOURNAL;PREFER;REFERENCE. So in that case, the query engine will create a temporary index to order the results. That index is only visible to the user running the query so it would not be updated by other users modifying the table. Thus the first user would not see a newly added record.

Edit If there is an index that matches the ORDER BY clause (as stated in the comments), it is possible that ADS will still create a temporary index for efficiency reasons. If the WHERE clause filters the table such that only a small percentage of records pass, it is often faster to create a temporary index on the filtered result. It is possible that happened in this case.


answered 08 Aug '14, 12:55

Mark%20Wilkins's gravatar image

Mark Wilkins
accept rate: 26%

edited 11 Aug '14, 15:21

Thanks for your suggestion

There is an index JOURNAL; PREFREF; REFERENCE which is the primary key of the table, but I am not certain that the query uses that index. There he has a chance to do a refresh of the query without an OPEN / CLOSE? if I made ​​a close/open, I lose the muti-select on the grid tied and my batch processing no longer works

(10 Aug '14, 23:23) mgr

did you try to remove the numeic part of the ORDER BY?

(21 Aug '14, 21:36) Günter Kieni...

Is it possible to prevent ADS from creating an temporary index?

(04 Feb '15, 07:07) Dontenwill_Max

Is it possible to prevent ADS from creating an temporary index?


answered 02 Mar '15, 01:24

Dontenwill_Max's gravatar image

accept rate: 0%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 08 Aug '14, 06:09

Seen: 3,448 times

Last updated: 02 Mar '15, 01:24

Advantage Developer Zone Contact Us Privacy Policy Copyright Info

Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.