home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db4bugs.zip / ANOMALY9.TXT < prev    next >
Text File  |  1989-05-15  |  15KB  |  384 lines

  1. ANOMALIES UPLOADED ON 05-15-89
  2.  
  3.  
  4.                                    ANOMALY9.TXT
  5.  
  6.  
  7. The following listing addresses ten known anomalies when using
  8. dBASE IV.  Use of these techniques will aid you in avoiding
  9. anomalies that have been reported to our Software Support
  10. Center.  This report will be supplemented as new information is
  11. received.  
  12.  
  13.  
  14. *************************************************************************************
  15.  
  16.  
  17.                                    ANOMALIES
  18.  
  19.  
  20. INKEY() values different from dBASE III PLUS
  21.  
  22.      Some keystroke values returned for INKEY() have changed from
  23.      dBASE III PLUS and the wrong values have been documented in
  24.      "Functions", page 4-55 of Language Reference.
  25.      
  26.      The table below contains the values returned from both
  27.      products.
  28.      
  29.           Key                 dBASE IV            dBASE III PLUS
  30.      
  31.           Home                    26                   1
  32.           End                      2                   6
  33.           Ctrl-Rightarrow          6                   2
  34.      
  35.      On the same page, Ctrl-F is not Ctrl-End but it is actually
  36.      just the End key.
  37.      
  38. =====================================================================================
  39.  
  40.  
  41. COPY STRUCTURE EXTENDED doesn't copy the active index tags
  42.  
  43.      If COPY TO filename STRUCTURE EXTENDED is issued when the
  44.      file in USE has active index tags, the resulting file's
  45.      FIELD_IDX field will reflect a value of "N", incorrectly
  46.      denoting an absence of index tags in the source file.  This
  47.      problem also occurs with COPY STRUCTURE.
  48.      
  49.      EXAMPLE:
  50.           
  51.           USE One.DBF
  52.           DISPLAY STRUCTURE 
  53.           Structure for database: D:\DB4\ONE.DBF
  54.           Number of data records:      12
  55.           Date of last update   : 02/03/89   
  56.           Field  Field Name  Type       Width    Dec    Index
  57.               1  NAME        Character     10               Y
  58.               2  COMMENT     Memo          10               N
  59.               3  NUMBER      Numeric        7      2        N
  60.           ** Total **                      28
  61.           
  62.           COPY STRUCTURE EXTENDED TO Aaa.DBF
  63.           USE Aaa.DBF
  64.           LIST
  65.      
  66.      Record#  FIELD_NAME FIELD_TYPE FIELD_LEN FIELD_DEC FIELD_IDX
  67.      
  68.            1       NAME       C          10        0         N
  69.            2       COMMENT    M          10        0         N
  70.            3       NUMBER     N           7        2         N
  71.      
  72.      WORKAROUND:
  73.      
  74.      The workaround is to EDIT the resulting .DBF file (e.g.
  75.      Aaa.DBF). Changing each record's FIELD_IDX contents to "Y"
  76.      when appropriate. 
  77.      
  78. =================================================================================
  79.  
  80.  
  81. dBASE IV Header Structure
  82.  
  83.      The dBASE IV header structure has been documented
  84.      incorrectly on the section "Database Header Structure", page
  85.      E-2 of Language Reference. Byte 0 information should be as
  86.      follows:
  87.      
  88.         Bits 0,1,2      indicates the version number
  89.         Bit  3          indicates the presence of a dBASE IV memo
  90.                         file
  91.         Bits 4,5,6      indicates the presence of a SQL table
  92.         Bit  7          indicates the presence of dBASE III
  93.                         PLUS/IV 
  94.                         memo file
  95.      
  96.      All the other information on Tables E-1 and E-2 are correct.
  97.      
  98. =====================================================================================
  99.  
  100.  
  101. @..GET..PICTURE @M ignores subsequent PICTUREs
  102.  
  103.      When @...GET...PICTURE...@M is issued, subsequent PICTURE
  104.      templates are ignored.  Rather than displaying the
  105.      respective values in the specified PICTURE formats, the
  106.      default lengths and formats are displayed.  This will also
  107.      affect reports and labels that are run subsequent to
  108.      @...GET...PICTURE...@M.
  109.      
  110.      EXAMPLE:
  111.      
  112.      items = space(10)
  113.      mvar2 = "dummy"
  114.      @ 5,5 GET mvar1 PICTURE "@M item1,item2,item3"
  115.      @ 6,5 SAY mvar2 PICTURE "X"    && displays "dummy" instead
  116.                                     && of "d"
  117.      READ
  118.      
  119.      WORKAROUND:
  120.      
  121.      In the beginning of your program initialize a variable to a
  122.      null string. Then, GET that memory variable on the same line
  123.      as the @...GET...PICTURE "@M" but with the column coordinate
  124.      at the right edge of the screen.
  125.      
  126.         junk = ""
  127.         ...
  128.         @ 5,5  GET mvar1 PICTURE "@M item1,item2,item3"
  129.         @ 5,75 GET junk 
  130.         ...
  131. =====================================================================================
  132.  
  133.  
  134. Division of nearly identical numbers, returns inaccurate results
  135.  
  136.      If you divide numbers whose first 7 significant digits are
  137.      equivalent, and whose remaining digits are not equivalent,
  138.      erroneous values will result.
  139.      
  140.      EXAMPLE:
  141.      
  142.          ? 5.0 / 5.0000001 
  143.          2
  144.      
  145.          ? 11111111/11111112
  146.          2.0
  147.      
  148.          ? 5/((5/3)*3)
  149.          2
  150.      
  151.      WORKAROUND:
  152.      
  153.      Convert one of the operands (the numerator or the
  154.      denominator) to a float type value.  This can be
  155.      accomplished by using the FLOAT() function.  For example:
  156.      
  157.          ? FLOAT(5.0)/5.0000001 
  158.      
  159.      will yield the correct result of 1.00.
  160.      
  161. =====================================================================================
  162.  
  163.  
  164. SEEK() of target file with index tag parameters
  165.  
  166.      If the SEEK() function is issued where the function's lookup
  167.      expression uses a field in the current work area, and the
  168.      lookup is performed on a file in an unselected work area,
  169.      corruption can occur in the currently selected database.  
  170.      
  171.      If the SEEK() is performed with a character field, the field
  172.      immediately following that field in the file structure will
  173.      appear to be blank.  If no changes are made to the record in
  174.      the selected work area, no permanent corruption occurs. 
  175.      However, EDITing the record will permanently corrupt the
  176.      following field's value.
  177.      
  178.      If the SEEK() is performed with a numeric field, then
  179.      DISPLAY STRUCTURE will reveal corruption in the width of the
  180.      numeric field.  If this damage occurs and the damaged record
  181.      is edited, the database will become permanently corrupted.  
  182.      
  183.      The same is true if the SEEK() function is issued from
  184.      within a .FRG, .LBG or .QBE.
  185.      
  186.      EXAMPLE:
  187.      
  188.         USE File1
  189.         USE File2 INDEX Numfield IN 2
  190.         ? SEEK(Numfield, "File2")
  191.      
  192.      DISPLAYing the current record:
  193.      
  194.         Record#      NUMFIELD CHRFIELD FLOFIELD DATFIELD
  195.         1                  42          42576.35 04/29/62
  196.      
  197.      reveals that data in the Chrfield has been blanked.
  198.      
  199.      WORKAROUND:
  200.      
  201.      If SEEK() is used in a .PRG, store the field to a memory
  202.      variable and use the memory variable as SEEK's expression
  203.      parameter.  If SEEK() is used in a .FRG, .LBG, or .QBE,
  204.      create a calculated field whose expression is the field's
  205.      name and use this calculated field as SEEK's expression
  206.      parameter.
  207.      
  208. ===================================================================================
  209.      
  210.  
  211.  
  212. APPEND FROM ... SDF with exponential data
  213.  
  214.      An APPEND FROM <filename> SDF of a text file containing data
  215.      in exponential notation, while correctly storing the data
  216.      internally as fixed format, displays the data in exponential
  217.      format.
  218.      
  219.      EXAMPLE:
  220.      
  221.         USE filename                    && one numeric or float
  222.                                         && field
  223.         APPEND FROM filename TYPE SDF   && text file contains
  224.                                         && 15E+02
  225.         ? numfield
  226.             15E+02                  && how value is displayed
  227.         ? numfield*1
  228.             1500                    && proof of internal storage
  229.      
  230.      The above example assumes the width of the numeric field is
  231.      long enough to include the full exponential expression.
  232.      
  233.      WORKAROUND:
  234.      
  235.      Issuing a REPLACE ALL numfield WITH numfield will restore
  236.      the display of field values to fixed format.  The above
  237.      example now has the following result:
  238.      
  239.         ? numfield
  240.             1500
  241.      
  242. ====================================================================================
  243.  
  244.  
  245. Additional fixes for Label.GEN
  246.  
  247.      There have been several changes incorporated in the new
  248.      Label.GEN file supplied since April 7,1989.  The corrections
  249.      are:
  250.      
  251.      1.   If the first field of a label was placed on a line
  252.           other than the first physical line of the label, the
  253.           error 
  254.      
  255.                Invalid or Unknown function 
  256.                DO WHILE ___&lc_temp.()
  257.                Cancel   Ignore    Suspend
  258.      
  259.           is returned when labels are printed and a label that
  260.           requires blank suppression is reached.  Placing a
  261.           literal blank space on the first line of the label will
  262.           prevent this error from occurring in addition to the
  263.           solution found in the new .GEN file.
  264.           (This error was new to the 2-22-89 version of
  265.           Label.GEN.)
  266.      
  267.      2.   The SAMPLE routine produced sample labels to test label
  268.           alignment, but the sample labels contain one line too
  269.           many per label.  The workaround for this error is to
  270.           modify the .LBG file and to remove the first question
  271.           mark (?) after the line DO WHILE choice = "Y" in
  272.           PROCEDURE SAMPLE.  
  273.           (This error occurred in all previous versions of
  274.           Label.GEN.)
  275.      
  276.      3.   If a field is placed on a line and a literal character
  277.           is the only thing following the field on the line, the
  278.           error message 
  279.      
  280.                "IF LEN(TRIM( tmp4lbl[1,3] + )) > 0  
  281.                Error on line ---: bad EXPRESSION" 
  282.      
  283.           is returned during compilation.  
  284.           (This error existed in all previous versions of
  285.           Label.GEN.)
  286.           
  287.      Download the updated file Label.GEN from the dBASE IV
  288.      Library and copy it over the Label.GEN in your dBASE IV
  289.      directory.  This new Label.GEN also incorporates the fixes
  290.      that were included in the Label.GEN that was uploaded on
  291.      1-20-89, and 1-27-89, and 4-07-89.
  292.  
  293. =====================================================================================
  294.  
  295.  
  296. Queries containing the USE AGAIN phrase, lose file handles
  297.  
  298.      Opening files with the syntax USE...AGAIN causes the
  299.      permanent loss of file handles during the current dBASE IV
  300.      session.  
  301.      
  302.      All queries open database files with the syntax USE
  303.      <filename> AGAIN.  This command opens the file in a manner
  304.      that allows the same file to be opened simultaneously in two
  305.      work areas.  This technique is required in QBE files when
  306.      performing self-joins, as documented on page 7-25 of Using
  307.      the Menu System.  Files USEd with the AGAIN clause can be
  308.      closed but dBASE is unable to release the file handles they
  309.      required.  
  310.      
  311.      As a consequence of the fact that USE...AGAIN causes the
  312.      irretrievable loss of file handles, repeated opening and
  313.      closing of queries may ultimately result in the loss of all
  314.      available file handles, and the return of the error message
  315.      "Too many files are open".  
  316.      
  317.      The current number of files open can be viewed at the Dot
  318.      Prompt with the DISPLAY STATUS command.  dBASE IV starts up
  319.      with three files open.  The total number of "dBASE" file
  320.      handles that can be used is set in CONFIG.DB (not in
  321.      CONFIG.SYS!), and the default is 99.  That is, the number of
  322.      file handles available is 99, regardless of the number set
  323.      in CONFIG.SYS.  
  324.      
  325.      When file handles have been lost in this fashion, QUITting
  326.      dBASE is the only way to "CLOSE" the open file handles.
  327.      
  328.      EXAMPLE:
  329.      
  330.      Set up a query that links two files, or set up the self-join
  331.      query as described on page 7-25 of Using the Menu System. 
  332.      Exit to the Dot Prompt and DISPLAY STATUS.  In one case 13
  333.      files had been opened.  Going back to ASSIST and modifying
  334.      the query, then issuing DISPLAY STATUS showed 25 handles
  335.      used.  Issuing CLOSE ALL, then just opening the query showed
  336.      31 handles in use.  CLOSE ALL, modifying and saving the
  337.      query showed 36 used.  A final CLOSE ALL showed 30 file
  338.      handles consumed.  Issuing CLOSE ALL/CLEAR ALL has no effect
  339.      on these lost file handles.  
  340.      
  341. =====================================================================================
  342.  
  343.  
  344. Additional fixes for Report.GEN
  345.  
  346.      The Report.GEN file has been updated to correct the
  347.      following two errors.  These errors existed in the
  348.      Report.GEN file dated 2-2-89:
  349.      
  350.      1.   An un-named calculated field located in the detail band
  351.           and set with the option to Suppress repeated values:YES
  352.           will cause an error to be returned when the .FRG file
  353.           is compiled.  The error will be:
  354.      
  355.                     IF .NOT. (r_msrv1 = )
  356.                     Error on line 176: Bad EXPRESSION
  357.      
  358.                     r_msrv1=
  359.                     Error on line 177: Syntax error
  360.      
  361.           (the line numbers above will be dependant on your
  362.           report.)
  363.      
  364.      2.   If the menu option Bands:Page heading in report
  365.           intro:NO is chosen, the intro band is printed without a
  366.           report header band.  In addition, the report summary
  367.           moves below the page footer band in the MODIFY REPORT
  368.           design screen.  When this option is chosen and a Pageno
  369.           predefined page number field is placed in the page
  370.           footer band, no error is returned but the resultant
  371.           reports are page numbered 1,3,5... and blank pages are
  372.           produced for pages 2, 4 and 6.
  373.      
  374.      Both of these errors have been corrected in Report.GEN files
  375.      dated 4-13 and later.
  376.  
  377.      Download the updated file Report.GEN from the dBASE IV
  378.      Library and copy it over the Report.GEN in your dBASE IV
  379.      directory.  This new Report.GEN also incorporates the fixes
  380.      that were included in the Report.GEN that was uploaded on
  381.      02-02-89.
  382.  
  383. ================================================================================
  384.