Microsoft KB Archive/189864

= BUG: Data Written to Table Despite Textbox Returning False =

Article ID: 189864

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q189864



SYMPTOMS
Visual FoxPro writes data to a table, even though a text box within a grid returns false (.f.).



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
This behavior also occurs when you use visual development tools instead of code to create the form and grid.

Steps to Reproduce Behavior
  Create a program that contains the following code: CREATE TABLE TestTable (Field1 c(1)) APPEND BLANK

PUBLIC oForm1 oForm1 = CREAT('Form') oForm1.SHOW

oForm1.ADDOBJECT('Grid1','GridClass') oForm1.Grid1.VISIBLE = .T.

DEFINE CLASS GridClass AS GRID ADD OBJECT column1 AS ColumnClass RECORDSOURCE = 'TestTable' RECORDSOURCETYPE = 1 ENDDEFINE

DEFINE CLASS TextClass AS TEXTBOX PROC VALID RETURN .F.     ENDDEFINE

DEFINE CLASS ColumnClass AS COLUMN ADD OBJECT text1 AS TextClass ENDDEFINE  Run the program and type a letter in the text box of the first column of the grid. A wait window appears informing you of the invalid input. Clear the wait window and close the form. Another wait window appears when you close the form. Ignore it. Type the following in the Command window:

BROWSE



RESULT: The letter you typed in step 2 appears in the table even though the textbox object returned false.

If the text box simply resides on the form instead of within a grid and its Valid event returns false, the form does not close. You would be in an endless loop and unable to close Visual FoxPro.

Additional query words: corruption corrupt extra data kbVFp300bug kbVFp300bbug kbVFp500abug kbVFp500bug kbVFp600bug kbXBase

Keywords: kbbug kbnofix KB189864

-

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

© Microsoft Corporation. All rights reserved.