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


New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Started by DataEase
You will need to Sign In to be able to comment on the Blog!

New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Download Sample!


Not all of us has got to grips with the concept of ExecDQL so we have taken some time to create a simple sample to show you the differences between the different functions and how they can be used.

Take your time to run though it and "steal" some ideas.

The future of DataEase is built around the "freedom" of DQL from the former limitations.

With ExecDQL you can use DQL to manipulate and generate any side of your application and this will be even more powerful in the future versions of Dataease.

Before you begin!  

The main importance of this is to remember that it has NOTHING to do with the DQL that you are used to use other than the syntax of DQL itself.

ExecDQL live outside the paradigm of DQL from DFD and DFW.


ExecDQL is not a document it is a script as text and it can be stored in a field, in a derivation in a memo, in a file or in a lable etc.

You cannot execute a ExecDQL by doing RunProcedure() or DocumentOpen()

If you use RunProcedure() or DocumentOpen() in a ExecDQL it will open a old style DQL and not an execDQL.

An ExecDQL is part of the data and not part of the definition/document hierarchy.

If you have a memo in your form you can execute a DQL written (looked up) in that Memo with the command 

MemoExecDQL(FieldName etc) ex. MemoExecDQL(MyDQLMemo etc.
LabelExecDQL("ObjectName")  ex LabelExecDQL("MyDQLLabel" etc
FileExecDQL("FileName" ex. FileExecDQl("C:\DQLS\DQL1.TXT" etc.
ExecDQL("DQL script directly") ex. ExecDQL("delete records in MyTable .") 


Written by DataEase 17/03/17 at 17:09:04 Dataease [{8}]FIVE

Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

this is all very nice.

Does it work with "any" as well? 

Example

for PERSONAL

with

( Austritt >= data-entry Field1 or

Austritt = blank ) and

Eintritt <= data-entry Field1 and

Freigabe = "J"and

any ZEITMODELL with ( MNR = PERSONAL MNR and Wochentag =  Tag )

Sollstunden > 0 ;

list records

MANR : count ;

Name ;

any ERFASSUNG with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR ;

any ERFASSUNG Bewegungsart ;

any ERFASSUNG von .


Written by Rainer 17/03/17 at 21:12:27 Dataease [{8}]FIVE

Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Of course. You ca do anything you can in "traditional" DQL and then some.

It is however very awkward to include tags that [{any ERFASSUNG with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR}]

So the best cause of action is simply to do like this:

define "vBewegungsartNR" text .
define "vBewegungsart" text .
define "vVon" text . -- you can of course define it as any type of variable but as I don't know what they are the safest bet is always text.

for PERSONAL

with

( Austritt >= data-entry Field1 or

Austritt = blank ) and

Eintritt <= data-entry Field1 and

Freigabe = "J"and

any ZEITMODELL with ( MNR = PERSONAL MNR and Wochentag = Tag )

Sollstunden > 0 ;

vBewegungsartNR := any ERFASSUNG   with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR .

vBewegungsart := any ERFASSUNG Bewegungsart .

vVon := any ERFASSUNG von .

list records

MANR : count ;

Name ;

vBewegungsartNR ;

vBewegungsart ;

vVon .

DQL Body.
.items
[{vBewegungsartNR}] [{vBegungsart}] etc.

.end

WHich is much much neater and easier to deal with.



In ExecDQL 2.0 we have fixed this by adding AS as a new keyword. To be honest, this is something that has been missing for a very long time.

for PERSONAL

with

( Austritt >= data-entry Field1 or

Austritt = blank ) and

Eintritt <= data-entry Field1 and

Freigabe = "J"and

any ZEITMODELL with ( MNR = PERSONAL MNR and Wochentag = Tag )

Sollstunden > 0 ;

list records

MANR : count ;

Name ;

any ERFASSUNG with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR AS "vArtNr" ;

any ERFASSUNG Bewegungsart AS "vBeweg" ;

any ERFASSUNG von AS "vVon" .

In ExecDQL 2.0 you will also be able to use "understandable" names on your Data-Entry fields.


Written by DataEase 19/03/17 at 20:31:09 Dataease [{8}]FIVE