Paradox Community

Items in pnews.paradox-dos

Subject:Re: Converter Update
Date:Thu, 5 Jul 2018 15:50:39 +0100
From:Michael Kennedy <Info@KennedySoftware.ie>
Newsgroups:pnews.paradox-dos
> Your approach uses standard PAL MENU {Ask} ... (in your case generated 
> by QBE_2_PAL) to create query images and populate
> them using PAL, as opposed to a QUERY/ENDQUERY text block getting parsed 
> into a set of prefilled query images.
> 
> Query images are based on their underlying tables and provide structural 
> information necessary for query construction
> and validation. As an aside, this means QUERY/ENDQUERY text cannot be 
> reliably converted directly to SQL outside the
> database environment.
> 
> QUERY/ENDQUERY is not necessarily immediately followed by Do_It! Query 
> images can be modified by PAL in the mean-time,
> in much the same way as an editable table image.

Very good point...

> At Do_It! the query is generated and executed.
> 
> Either method is supported by the converter. Its all just basic PAL. 

Super!!

(I had thought you might be parsing the Query---EndQuery PAL syntax, 
rather than the final images at the Do_It! moment, so that's excellent).

> Most of the complexity is not in the initial
> parsing, its in the parsing of the image data and deciding what to do 
> with it all.

I understand (kinda!) - sounds very, very tricky and messy... I did 
glance through your many examples, and you seem to have covered a 
helluva lot in there. I'm not up to speed at all on SQL syntax - 
especially the oddball and complex stuff - so I can't help you on that side.

   - Mike


> On 2/7/18 9:00 am, Michael Kennedy wrote:
>> WOW!!!!
>>
>> Just one point (that I touched on previously)... I never use the 
>> QUERY/ENDQUERY approach, and I think others did likewise - mainly for 
>> readability of the PAL code.
>>
>> Instead:
>>    1. I used QBE to build the on-screen query, interactively.
>>    2. I then ran that QRY_2_PAL script, to convert the on-screen query 
>> to standard PAL code (see below).
>>    3. I then put that PAL code into the main app Script, followed by a 
>> DO_IT!, and some basic checks that the query ran successfully.
>>
>> During execution, that PAL code built the query, just like the 
>> QUERY/ENDQUERY approach, and then the DO_IT! executed it.
>>
>> So, this is all the converter would see (no QUERY/ENDQUERY syntax):
>>
>>     MENU {Ask} SELECT Trans_01_Tmp
>>         [Account No]                = "_ac1"
>>         [Year End Date]             = "_yr1"
>>         [Run Batches]               = "Y"
>>         [Business Typ]              = "F or B"
>>     MENU {Ask} SELECT Trans_51_Tmp
>>         MOVETO [Account No]           "_ac1"     CHECKPLUS
>>         MOVETO [Year End Date]        "_yr1"     CHECKPLUS
>>         [Bank Code]                 = "Blank or 0"
>>         [Lodgement]                 = "_am1,calc 0-_am1 as Amt"
>>     Do_It!  Qry_is_Ok("C18")  Add "Answer" Temp_1  Delete "Answer"  
>> ClearAll
>>
>>    - Mike
>>
>>
>> On 01/07/2018 18:43, Bernie van't Hof wrote:
>>> Still nibbling away ..
>>> Some changes have been made after recent discussions (thank you).
>>> Github updated. Most changes around:
>>>      pdox/converter/qbeQuery/toSql/Query.php
>>>      pdox/converter/qbeQuery/PalQuery.php
>>> Feedback welcome!


Copyright © 2004 thedbcommunity.com