Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21431

Check to see if a connection is open or closed

$
0
0
How to make interface * directly * to the database engine MSAccess to identify and count the number of open connections?

This would serve to create a small program that would be used during the development of dynamic web pages in ASP.
When you launch the ASP page in a browser and opens the connection

Code:

cnn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source =" + Session ("gloDB") + "dbSkiAlp.MDB"
the program should show 1.
When the page finishes and closes the connection
Code:

cnn.close: set cnn = nothing
the program should score 0.

If you forget to close the connection (set cnn=nothing), the program continues to score 1. This should be a useful warning to the developer.
Thanks in advance.

Viewing all articles
Browse latest Browse all 21431

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>