Easy to Create, Easy to Change - Easy to use!


Problem with DEOS @DFDDQLSet


Started by Peter Birney, PB Associates
Search
You will need to Sign In to be able to add or comment on the forum!

Problem with DEOS @DFDDQLSet

I have been trying out the options available with DEOS - @DFDDQLNr, @DFDDQLName and @DFDDQLPath all give me the results that I was expecting, but I cannot get @DFDDQLSet to give me anything - No errors, no results, nothing!

I have tried executing the function on a button on a form with two memo fields available but to no avail.

My call is

DEOS("@dfddqlset","c:\cf\vatscaaa.dbr","memodql","memobody")

I have checked that the .dbr file exists in that folder and I am using Version 8.5.0.2069.

Written by Peter Birney, PB Associates 30/12/15 at 12:13:45 Dataease [{8}]FIVE

Case sensitive object names and the usefulness of RefreshForm()

Ahhh...
Firstly!

GR8!

This feature is very under documented yet to put it mildly, so 10 points for trying it.

Your version should be more than adequate for what you are trying to do but there is a couple of "traps" you need to check.

1. All functions that work on Objects are case sensitive so make sure that the ObjectName on you memos are 100% the same as you try to use in the functions.

2. Due to the "peculiarites" of the DataEase Object model, setting the value directly into a column via the ObjectName will not necessarily update the presentation. It might, or it might not depending on dependencies etc. Early in DE8 we "fixed" this buy always running a RefreshForm() from inside the function, but this is BAD practice as you might use the function in a DQL etc. so we split them and that is how RefreshForm() came about.

Best practice then is that you always call a RefreshForm() after manipulating Memos etc, to get them to refresh in the form.

DEOS("@dfddqlset","c:\cf\vatscaaa.dbr","memodql","memobody")+RefreshForm() 

Should give you the wanted result if the Memo Objectnames are correct.

Good luck and let us know how it came along.

RefreshForm() simply only refresh the GUI controls with what is stored in Memory so it will not have any impact on what is saved in the table etc. It is what it says, it simply coordinate the visible presentation with the data that would be saved to table if you did RecordSave().

RefreshScreeen() on the other hand re-read what is saved in the table so will change all Columns in form with saved data.

Written by DataEase 30/12/15 at 12:42:26 Dataease [{8}]FIVE

Re:Case sensitive object names and the usefulness of RefreshForm()

I added the RefreshForm and altered the cases of the memo names so that they matched exactly and it worked!

The reason for my foray into this area of the software is that I need to be able to show clients that it is possible to bring their older DQL procedures into the latest version of DataEase, albeit that the DQL and Bodies may not function in exactly the same way as before.

Written by Peter Birney, PB Associates 30/12/15 at 14:23:03 Dataease [{8}]FIVE

Re:Re:Case sensitive object names and the usefulness of RefreshForm()

You can get it to work very much the same way, but you have to play a little with the Script and body.

You will need to replace all Data-entry fields with the four data-entry arguments on the functions  (data-entry field1 through data-entry field4).

If you need more data-entry variables you can pick them directly out of the form with GetValue() or transfer them via SetVar()/GetVar().

If you want the WebObject to treat your HTML as DOS simply encapsulate it in a  <prev></prev> tag. This way you can preview, print and generate PDFs that look exactly like they did in DOS.

Written by DataEase 30/12/15 at 15:36:06 Dataease [{8}]FIVE

Re:Re:Re:Case sensitive object names and the usefulness of RefreshForm()

Used a <pre></pre> tag rather than a <prev></prev> tag and it is fine!

Written by Peter Birney, PB Associates 04/01/16 at 16:35:23 Dataease [{8}]FIVE

Re:Re:Re:Re:Case sensitive object names and the usefulness of RefreshForm()

Sorry. Dyslexia is the biggest problem for Programmers ;-)

What happens when you write from the top of your head without trying to run it through the "compiler".

Written by DataEase 05/01/16 at 08:32:18 Dataease [{8}]FIVE