Microsoft KB Archive/161054

= FIX: COPY TO ... TYPE SDF Incorrectly Copies Null Fields =

Article ID: 161054

Article Last Modified on 10/15/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition

-



This article was previously published under Q161054



SYMPTOMS
The COPY TO TYPE SDF does not properly copy null type fields. The null fields do not appear in the output text file. The null fields in the SDF file have a zero width.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual FoxPro 5.0a.



MORE INFORMATION
The following program illustrates this behavior.

Steps to Reproduce Behavior
  Create a program containing the following code and execute it: CREATE CURSOR test (C1 C(5) NULL, C2 C(5) NULL, C3 C(5) NULL, C4 C(5);  NULL) FOR i=1 TO 10 IF MOD(i,2)=0 INSERT INTO test (C1,C2,C3,C4) VALUES ('AAAAA',NULL,'CCCCC',NULL) ELSE INSERT INTO test (C1,C2,C3,C4) VALUES (NULL,'BBBBB',NULL,'DDDDD') ENDIF ENDFOR BROWSE   Close the Browse window and type the following commands in the Command window: COPY TO Test.txt TYPE SDF MODI COMM Test.txt  Notice the null fields from the cursor are not present in the SDF text file.

Keywords: kbbug kbfix kbvfp500afix kbprogramming KB161054

-

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

© Microsoft Corporation. All rights reserved.