Carlos A. Pereira [APKomp]
2008-11-20 22:30:34 UTC
The "Set Relation To" does not work (?)
under a "Calculated Field" and under a "Set Key To"
(in dBASE Plus) (not in Visual dBASE 5.7)
Thanks for your attention, in advance
Carlos A. Pereira
APKomp
********************************************************************************
* Example code
****************
***
* condition to filter && line 01
ynumerecibo=12050 && line 02
*** && line 03
* open table1 && line 04
SELECT 1 && line 05
USE table1 ORDER numerecibo ALIAS table1 && line 06
SET FIELDS TO table1->numerecibo && line 07
* open table2 && line 08
SELECT 2 && line 09
USE table2 ORDER numerecibo ALIAS table2 && line 10
SET FIELDS TO table2->denoentida && line 11
SET FIELDS TO datadocume=table2->datarecibo && line 12 (enable/disable "Calculated Field")
*** && line 13
* set key to (filter) // && table1 order: STR(numerecibo,10,0) && line 14
SELECT table1 && 1 && line 15
SET KEY TO STR(ynumerecibo,10,0) && line 16 (disable/enable "Set Key To")
GOTO TOP && line 17
*** && line 18
* set relation to // && table2 order: STR(numerecibo,10,0) && line 19
SELECT table1 && 1 && line 20
SET RELATION TO STR(table1->numerecibo,10,0) INTO table2 ADDITIVE && line 21
GOTO TOP && line 22
*** && line 23
COPY TO table3 ALL && line 24
*** && line 25
SELECT 1 && table1 && line 26
SET RELATION TO && line 27
SET KEY TO && line 28
CLOSE TABLES && line 29
********************************************************************************
* Test Code
****************
*
* IF - enabled line 12: SET FIELDS TO datadocume=table2->datarecibo
* - enabled line 16: SET KEY TO STR(ynumerecibo,10,0))
* RESUL: NOT OK (set relation NOT OK)
*
* IF - enabled line 12: SET FIELDS TO datadocume=table2->datarecibo
* - disabled line 16: *SET KEY TO STR(ynumerecibo,10,0))
* RESUL: OK (set relation OK)
*
* IF - disabled line 12: *SET FIELDS TO datadocume=table2->datarecibo
* - enabled line 16: SET KEY TO STR(ynumerecibo,10,0))
* RESUL: OK (set relation OK)
*
********************************************************************************
* View Test Code
****************
USE table3
BROWSE
*USE
********************************************************************************
under a "Calculated Field" and under a "Set Key To"
(in dBASE Plus) (not in Visual dBASE 5.7)
Thanks for your attention, in advance
Carlos A. Pereira
APKomp
********************************************************************************
* Example code
****************
***
* condition to filter && line 01
ynumerecibo=12050 && line 02
*** && line 03
* open table1 && line 04
SELECT 1 && line 05
USE table1 ORDER numerecibo ALIAS table1 && line 06
SET FIELDS TO table1->numerecibo && line 07
* open table2 && line 08
SELECT 2 && line 09
USE table2 ORDER numerecibo ALIAS table2 && line 10
SET FIELDS TO table2->denoentida && line 11
SET FIELDS TO datadocume=table2->datarecibo && line 12 (enable/disable "Calculated Field")
*** && line 13
* set key to (filter) // && table1 order: STR(numerecibo,10,0) && line 14
SELECT table1 && 1 && line 15
SET KEY TO STR(ynumerecibo,10,0) && line 16 (disable/enable "Set Key To")
GOTO TOP && line 17
*** && line 18
* set relation to // && table2 order: STR(numerecibo,10,0) && line 19
SELECT table1 && 1 && line 20
SET RELATION TO STR(table1->numerecibo,10,0) INTO table2 ADDITIVE && line 21
GOTO TOP && line 22
*** && line 23
COPY TO table3 ALL && line 24
*** && line 25
SELECT 1 && table1 && line 26
SET RELATION TO && line 27
SET KEY TO && line 28
CLOSE TABLES && line 29
********************************************************************************
* Test Code
****************
*
* IF - enabled line 12: SET FIELDS TO datadocume=table2->datarecibo
* - enabled line 16: SET KEY TO STR(ynumerecibo,10,0))
* RESUL: NOT OK (set relation NOT OK)
*
* IF - enabled line 12: SET FIELDS TO datadocume=table2->datarecibo
* - disabled line 16: *SET KEY TO STR(ynumerecibo,10,0))
* RESUL: OK (set relation OK)
*
* IF - disabled line 12: *SET FIELDS TO datadocume=table2->datarecibo
* - enabled line 16: SET KEY TO STR(ynumerecibo,10,0))
* RESUL: OK (set relation OK)
*
********************************************************************************
* View Test Code
****************
USE table3
BROWSE
*USE
********************************************************************************