Consider the following ASP code snippet which instanttiates the Connection object:
<%
Dim objConn,strConnString
Set objConn=Server.CreateObject("ADODB.CONNECTION"
objConn.ConnectionString="Provider=sqloledb;Server=(local);Database=DBName;UID=sa;PWD="
objConn.Open
%>
Now should the above code snippet be included in the global.asa file in the Application_OnStart event so that it gets triggered whenever the application starts or should the above code snippet be inserted in a file & include that file in all the ASP pages? Which of the 2 is more effecient/economical with respect to server resources, database resources, retrieval time etc....?
Thanks,
Arpan
<%
Dim objConn,strConnString
Set objConn=Server.CreateObject("ADODB.CONNECTION"
objConn.ConnectionString="Provider=sqloledb;Server=(local);Database=DBName;UID=sa;PWD="
objConn.Open
%>
Now should the above code snippet be included in the global.asa file in the Application_OnStart event so that it gets triggered whenever the application starts or should the above code snippet be inserted in a file & include that file in all the ASP pages? Which of the 2 is more effecient/economical with respect to server resources, database resources, retrieval time etc....?
Thanks,
Arpan