Microsoft KB Archive/109456

From BetaArchive Wiki

APPEND FROM <Filename> TYPE SYLK Limited to 9,999 Records

ID: Q109456

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b
  • Microsoft FoxPro for Macintosh, version 2.5b

SUMMARY

Although the COPY TO <filename> TYPE SYLK command can copy a maximum of 65,534 records from a database to a SYLK file, the APPEND FROM <filename> TYPE SYLK command can copy only a maximum of 9,999 records from a SYLK file to a database.

NOTE: The EXPORT command, like the COPY TO command, can copy a maximum of 65,534 records to a SYLK file. The IMPORT command, however, does not support the SYLK file type.

MORE INFORMATION

Steps to Reproduce Behavior

1. Start FoxPro.

2. Create and run a program with the following code:

      SET STATUS ON
      CREATE TABLE test (fld1 N(6))
      COPY STRUCTURE TO slktest1.dbf
      COPY STRUCTURE TO slktest2.dbf

      FOR m.counter = 1 TO 65535
         INSERT INTO test (fld1) VALUES (m.counter)
      ENDFOR

      COPY TO slktest1.slk TYPE SYLK
         * Message on Desktop: 65534 records copied
      USE slktest1.dbf
      APPEND FROM slktest1.slk TYPE SYLK
         * Message on Desktop: 9999 records added

3. To verify that the COPY TO command actually copied more than 9,999

   records to SLKTEST1.SLK in the first place, run the code below.
   Afterwards, compare the sizes of SLKTEST1.SLK (created from TEST.DBF)
   and SLKTEST2.SLK (created from SLKTEST1.DBF). SLKTEST1.SLK should be
   1,365,188 bytes in size, while SLKTEST2.SLK should only be 198,953 bytes
   in size.

      USE slktest1.dbf
      COPY TO slktest2.slk TYPE SYLK
       * Message on Desktop: 9999 records copied
      USE slktest2.dbf
      APPEND FROM slktest2.slk TYPE SYLK
       * Message on Desktop: 9999 records added

Additional reference words: FoxMac FoxDos FoxWin 2.00 2.50 2.50a 2.50b KBCategory: kbprg KBSubcategory: FxprgGeneral


Last Reviewed: June 27, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.