Simplicty and flexibility!


Function::File

FileExecDQL
FileExecDQL("DQL TExT FILE","Data-Entry Field1","Data-Entry Field2","Data-Entry Field3","Data-Entry Field3","Export File")
FileExecDQL("C:\myDQLs\deleteall.dql")


To run a DQL script stored in a file as a function from anywhere.


DQL is the most useful part of a DE application but it has had its limitations because it has been part of the DQL document (report). With ExecDQL we have liberated it, and you can now call a DQL from anywhere at anytime. It follow normal DQL syntax rules and it will generate an variable length export file if you include a file name as the last parameter (parameter 6).

Because it is a function you have to reference the Data-entry fields (transfered as parameter 2-5) with fixed names i.e Field1, Field2, Field3 and Field4. Other than that it is completely traditional DQL.

The ExecDQL has the GUI context of the document from where it is called, so you can read and manipulate the document from the DQL. This means that ExecDQL is not only a Data manipulating procedure it can also be a GUI manipulating procedure.

If you need more input variables than 4 you can simply pick them out of the Form you are calling the ExecDQL from with GetValue()

Parameters


DQL File Name: (String)

A full or partial path to a file containing a DQL Script. You can combine With GetCurrent("AppPath") etc. to build path.

Data-Entry Field1: (String)

This is the parameter that you can reference inside the DQL script as Data-Entry field1.

Data-Entry Field2: (String)

This is the parameter that you can reference inside the DQL script as Data-Entry field2.

Data-Entry Field3: (String)

This is the parameter that you can reference inside the DQL script as Data-Entry field3.

Data-Entry Field4: (String)

This is the parameter that you can reference inside the DQL script as Data-Entry field4.

Export File: (String)

ExecDQL was designed to cover two major flaws in the DQL hierarchy of DFW. Manipulation and export so if you add a file name her and a list records in the DQL it will create a CSV file with column headers where the columns are in the order you put them in the list records.

PS! It is extremely quick.

Returns/Result


Nothing

Examples


Reference

See Also


GetValue()


MemoExecDQL()

LabelExecDQL()
ExecDQL()

StringEscape()
GetCurrent()

On the forum about FileExecDQL

On the blog about FileExecDQL

DataEase 8 - Forward Talk! ExecDQL(), MemoExecDQL() & FileExecDQL()

In DataEase 8 we try to break stuff down into simple functions so you can use it as LEGO bricks and make whatever you like. Simple but powerful. When developing DG3 we looked at DFW, DataEase 7 and WebPublsiher as standards of how "not" to do things....

Product: Dataease [{8}]FIVE. Written by DataEase 01/03/13 at 13:36:04


dg3_HelpView