Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Suggestions, Feedback regarding my old DB schema plannin
Message
De
24/04/2006 07:03:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Firebird
Divers
Thread ID:
01115240
Message ID:
01115915
Vues:
10
Hi,

>
>I guess I understood it that way but in any case, Views or SQL Pass-Thru, the select statements can get large with a lot of UNIONs and many issues with field size and lenghts. Or did you mean completely a PRG based creation of cursors?
>

Yes I meant prg based creation.

>
>I guess this is what you meant, is that I can do the same I did with audit tables, the only difference being I would store it in the main Parent-Child table as and when it is saved. Then I am sure I can pull them into the cursor being generated. I guess I will have to call the same (esp.) parent record multiple times for each account that will be affected by the users selections, for eg. a Purchase Bill parent table entry will atleast affect iSupplierAcctID and iPurchaseAcctID, so I guess I can
>
SELECT xyz, mSupplierNarration FROM tPurchase WHERE iSupplierAcctID = ?iLedgerID ;
>UNION ;
>SELECT xyz, mPurchaseNarration FROM tPurchase WHERE iPurchaseAcctID = ?iLedgerID
>
>Did I understand correct?
>

Maybe I didn't understand narrations. I took as some stored definition how to render data for display and printing. If what I understood is right it's something that 'presentation' routines should do on the fly.


>
>Can you share something of this generated-on-the-fly approach, as I am not clear how my complicated Naration Master entries (some of the narration templates rely on a SCAN ENDSCAN of the child table at the time of generation of audit records) be achieved your way. As I mentioned above I was, hopefully, able to understand your pre-created narrations without audit table above, as the concepts were same for me and I am not able to think about this out of the rut.
>

Here is how I do it (roughly):

There is a templates.txt file which is all about HTML. In it I have sections for particular templates + their rendering HTML tags. ie:
<!--Invoice Template-->
<table border="1">
<tr><th>...</th><th>...</th></tr>
<tr><td>%%oRow.Company%%</td><td>%%oRow.InvoiceDate%%</td></tr>
</table>
<!--Invoice Template-->
In other words it looks like a mailmerge template. A template reader, reads and converts them to procedures on the fly (sort of DOM code with .createElement, .appendChild etc). Another routine gets the necessary cursor, scatters to oRow and calss the corresponding renderer routine (%%..%% are placeholders for the variable data).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform