Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Connection won't close
Message
From
12/02/2003 15:26:38
Jorge Haro
Independent Consultant
Juarez, Mexico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
ADO Connection won't close
Miscellaneous
Thread ID:
00752453
Message ID:
00752453
Views:
59
Using VFP 6, SP5, SQL Server 7.0 Developer edition and MDAC 2.7 (ADO), I'm running into this situation with code like the following :
thisform.oConnection.Open()
thisform.RunProcess()
thisform.oConnection.Close()
MessageBox("Process finished")
The connection remains open until I close the messagebox window.

if I delay displaying the messagebox with something like:
thisform.oConnection.Open()
thisform.RunProcess()
thisform.oConnection.Close()
wait timeout 1
MessageBox("Process finished")
The connection closes as expected before the messagebox is displayed, I'm confirming this by using performance monitor.

It seems to be a timing issue, it happens only in real time, not when I trace through the code, I have different variations of code like that and I don't think it should be necessary to have to place that delay every time. TIA.
Next
Reply
Map
View

Click here to load this message in the networking platform