Microsoft KB Archive/72318

= Basic PDS ISAM Stores Blanks for Fixed-Length Strings > 255 =

Article ID: 72318

Article Last Modified on 11/21/2006



This article was previously published under Q72318



SUMMARY
For ISAM records that have fixed-length strings longer than 255 characters, the string is padded with blanks and ISAM stores the string with the blanks. This behavior is unusual when compared to how ISAM handles fixed-length strings of 255 characters or less, where only the string itself, and not trailing blanks, is stored.

This information applies to Microsoft Basic Professional Development System (PDS) version 7.0 for MS-DOS, and version 7.1 for MS-DOS and OS/2.



MORE INFORMATION
When a fixed-length string is greater than 255 characters, the internal representation of the field in the ISAM database changes from a &quot;VariableText&quot; or &quot;VariableString&quot;, to a &quot;Memo&quot; field. A Memo field is considered an aggregate data type.

As an aggregate data type, similar to arrays and nested user-defined types, the string is no longer indexable, and when the record is inserted into the database, every byte is written, including the blanks. This can cause an ISAM database to grow rather quickly. The only way to avoid this behavior is to use fixed-length strings shorter than 256 characters.

The following TYPE..END TYPE declaration gives examples of fixed-length strings that will and will not store blanks in an ISAM database. For example: TYPE Record SmallStr AS STRING * 250 'This won't store blanks LargeStr AS STRING * 750 'This will store blanks END TYPE For more information on ISAM data types, refer to pages 333-334 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; for versions 7.0 and 7.1.

Additional query words: BasicCom

Keywords: KB72318

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.