Welcome! Log In Create A New Profile

Advanced

WD12 Query problem

Posted by Piet van Zanten 
Piet van Zanten
WD12 Query problem
April 26, 2009 10:59AM
Hi,

I am using a single-file query with the hModifyFile parameter on a Hyperfile Classic file. This query shows the employees of one department. On a window I have a table linked to the query and a form on an internal window, also linked to the query. Selecting a line in the table does a FileToScreen to update the display in the form.

I modify a record using the form and use
- ScreenToFile(win_MyWindow,qry_MyQuery)
- hModify(qry_MyQuery) //+error processing
- TableDisplay(Table,taCurrentRecord)

First time I modify a record everything goes as expected, modifications are reflected in the table, the query and the datafile.
Now if I select another line in the table and modify the form, nothing happens. No hError either.
If I exit the window, reopen it and select and modify the same record it IS modified.
So each time only one modification is processed. (same goes for adding a record)

If I trace the file buffer, (qry_MyQuery.MyItem) the correct values are there just before the hModify is called. Re-executing the query has no effect (I want to avoid it anyway).

What am I missing :confused:

Regards,
Piet







Edited 1 time(s). Last edit at 04/26/2009 11:00AM by Piet van Zanten.
Piet van Zanten
Re: WD14 Same Query problem
April 27, 2009 11:28PM
Same in WD14
Piet van Zanten
Re: WD12 Query problem - SOLVED
April 29, 2009 12:49PM
Hi,

I checked what RAD did and found that if I change TableDisplay(Table,taCurrentRecord) into TableDisplay(taCurrentSelection) it works as expected.
I really don't understand why.... :confused:

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: