MySQL connections continue from client programs

At the college where I work, we are currently testing a (dry) new enrollment system that I have developed. The application has several modules (accounting, cashier, course schedule, reception, consulting, certification) installed in different offices. We are using MySQL Server 5.1 and the interface was developed using VB.Net.

The system has 1 computer server and 25 clients.

I noticed using the MySQL Administrator that client connections are persisted, although I used the syntax using for all data access / manipulation codes. I thought that after end using the operator, the connections would be automatically deallocated.

0


a source to share


1 answer


I usually find that using does not always close files and connections, esp if an exception is thrown, so I just use a try..finally block to ensure that the connection is permanently closed, no matter what happened in the application.



So, just try without using and use a finally block to close the connection and see if that fixes your problem.

+2


a source







All Articles