PRB: SQL Server Connections Not Closed from Visual BasicLast reviewed: April 25, 1997Article ID: Q77181 |
The information in this article applies to:
- Microsoft SQL Server Programmer's Toolkit, version 4.2
SYMPTOMSWhen developing programs with the Visual Basic Library for SQL Server (VBSQL), there are several problems that can occur when connections to SQL Server are not closed properly. This article describes the symptoms of these problems and provides information on how to avoid them.
CAUSE
WORKAROUNDBoth of the problems mentioned above can result when running programs in the Visual Basic interpretive mode. The problems can be quickly resolved by closing Visual Basic itself because when Visual Basic is closed, it frees up any existing MS-DOS file handles that were left open. In addition, SQL Server removes any associated "sleeping processes." While this method will resolve the problems if they occur, there can be negative consequences. For example, if the "Too many files" error is received, it may be difficult to save changes made since the last time the project was saved. Eliminating these problems can be difficult, if not impossible, because there are many times during the development and debugging process when the program may have to be terminated prematurely. However, it is possible to reduce the frequency at which these types of problems occur. The following precautions will help to achieve this goal:
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |