Microsoft KB Archive/297779

= FIX: Closing Connection While View Designer Is Open Crashes Visual FoxPro =

Article ID: 297779

Article Last Modified on 10/16/2002

-

APPLIES TO


 * 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 Q297779



SYMPTOMS
If you issue a SQLDISCONNECT function on the connection that the View Designer is using, Visual FoxPro (VFP) may quit and you may receive one of the following error messages:

In VFP version 6.0 running on Microsoft Windows 2000:

VFP6.exe has generated an error and will be closed by Windows. You need to restart the program. An error log is being generated.

In VFP version 6.0 running on Microsoft Windows Millennium Edition (Me):

Vfp6 has caused an error in VFP6.exe.

Vfp6 will now close.

In VFP verion 5.0 running on Microsoft Windows NT 4.0:

An application error has occurred and an application error log is being generated.



STATUS
This problem was corrected in Microsoft Visual FoxPro version 7.0 for Windows.

NOTE: In VFP version 7.0, when you perform the steps in the &quot;More Information&quot; section, you receive the following error message after step 3:

No connection associated with this cursor



Steps to Reproduce Behavior
  To set up a test database and open the View Designer, run the following code in a program file or the command window: SET SAFETY OFF CLOSE DATA ALL

lcDir = SET(&quot;DEFAULT&quot;) + CURDIR

CREATE DATABASE company CREATE TABLE employees (iEmpID I, cName c(80)) CLOSE DATABASES ALL

OPEN DATABASE company SHARED CREATE CONNECTION cnCompany CONNSTRING &quot;DSN=Visual FoxPro Database;&quot; + ; &quot;UID=;PWD=;SourceDB=&quot; + lcDir + &quot;Company.DBC;SourceType=DBC;&quot; + ; &quot;Exclusive=No;BackgroundFetch=No;Collate=Machine;DBQ=&quot; CREATE VIEW r_Employees REMOTE CONNECTION cnCompany SHARED AS ; SELECT * FROM employees

_CLIPTEXT = &quot;MODIFY VIEW r_Employees&quot; KEYBOARD &quot;{ctrl+f2}{ctrl+end}{ctrl+v}{enter}&quot;   After the View Designer appears, type the following in the command window: SQLDISCONNECT(0) This closes all open connections.

 Right-click the View Designer and click Run Query. In the ODBC dialog box, click Cancel. VFP displays the following error message:

Connectivity error: Unable to retrieve specific error information. Driver is probably out of resources

Click OK.

 Minimize and then maximize VFP. Right-click the View Designer again and click Run Query. In the Fetch is in progress dialog box, click OK.</li></ol>

Keywords: kbbug kbfix kbdatabase kbdesigner KB297779

-

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

© Microsoft Corporation. All rights reserved.