Recommended: IIS virtual host website anti-Trojan permission settings and security configuration sorting I have referred to many security settings on the Internet and did some practices on the security settings on WIN2003 and compiled them into these security settings articles. I hope they will be helpful to everyone. In addition, if there are any shortcomings, please give me some advice and then make up for it. Up, thank you! 1. System
| The following is the quoted content: <% Dim conn' Statement Set conn = Server.CreateObject(ADODB.Connection)'Create 'use Set conn = Nothing'Release %> |
We usually use the above form to create an object and use and release it. The question is how do we determine whether an object has been released? Is it OK to use isObject? Let's try it:
| The following is the quoted content: <% Dim conn Response.Write(isObject(conn)) 'Response is False Set conn = Server.CreateObject(ADODB.Connection) Response.Write(isObject(conn)) 'Response is True Set conn = Nothing Response.Write(isObject(conn)) 'Response is True %> |
It can be seen that it cannot be used to determine whether an object has been released. Then let's try using varType or typeName function:
| The following is the quoted content: <% Dim conn Response.Write(typeName(conn)) 'Result Empty Set conn = Server.CreateObject(ADODB.Connection) Response.Write(typeName(conn)) 'Result Connection Set conn = Nothing Response.Write(typeName(conn)) 'Result Nothing %> |
Therefore, to determine whether an object is released, we apply: typeName(conn)=Nothing (Be sure to use Nothing but not nothing, the lowercase result will not be True. Is ASP also case sensitive?
Share: ASP basic tutorial: How to display the ADO database paging when accessing What is pagination display when ADO accesses databases? If you have used the electronic bulletin board program on many websites, you should know that in order to improve the reading speed of the page, the electronic bulletin board program generally does not list all posts on one page.