BUG: Table Designer-Record Length Wrong if Field(s) Allow Nulls (193398)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0
  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q193398

SYMPTOMS

If you have a table that contains a field or fields, which allow NULL values, when you view the Statistics in the Table Designer's Table page, the record length is under reported by 1 byte.

RESOLUTION

Use the RECSIZE() function to find the correct record length.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Run the following code from a program (.prg) file:
          CREATE TABLE Testtab (F1 C(10) NULL, F2 N(10) NULL, F3 L)
          LIST STRUCTURE
          ?RECSIZE()
          MODIFY STRUCTURE
  2. Select the Table tab in Table Designer.
  3. The Length value in the Table Designer is 22, while the RECSIZE() function returns 23.
If there are no fields that allow NULL values, the two numbers agree. If there are any fields that allow NULL values, the Length listed in the Table Designer is 1 less than the correct value.

The record length is the sum of all the field lengths plus 1 byte for the delete mark and 1 byte for the NULL field information, if any fields allow NULL values.

REFERENCES


Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbbug kbnofix KB193398 kbAudDeveloper