` Using a variable to specify the Transaction Control File (TCF) (John Hickey ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Using a variable to specify the Transaction Control File (TCF)
1998-09-14 -- John Hickey
 
Try: GLOBALDATAPATH CSTRING(64) GLOBALDATAPATH = 'C:\DATA\' SEND(employee,'TCF=' & GLOBALDATAPATH & 'TOPSPEED.TCF') Here is additional information from a previous message by Malcolm Collett: ======================================== Hi Axel The documentation on how to use TCF is very weak! SEND(FILE,'TCF=X:\DATA\MYTCF.TCF') does not send anything to the file, it sets a global variable. Now whenever CheckOpen() opens a file, it uses this global variable. So you only need to set it once. I use the After Opening Files embed on the AppFrame (CW2003) to call a procedure. I use a procedure because the file is opened and closed (I'm lazy!). If you put the code directly into the embed, the file used will stay open until the app closes. That's why I use the separate procedure. This is the code I use: L:TcfPath = Clip(Path()) If L:TcfPath[Len(Clip(L:TcfPath))] = '\' ! is the last character of the path a backslash L:TcfPath = 'TCF=' & Clip(L:TcfPath) & 'Maintain.tcf' ! do not add a backslash Else L:TcfPath = 'TCF=' & Clip(L:TcfPath) & '\Maintain.tcf' ! add a backslash End ! If Send(Posn,Clip(L:TcfPath)) ! Posn must be open and listed under Other files - Posn was randomly selected ! ! Testing for backslash (\) is because Win95 and NT are not the same You can now have multiple sets of data, each having its own TCF file. Regards Malcolm Collett


Today is November 21, 2024, 8:08 am
This article has been viewed 35210 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: