How to create an object in the web server
S T E P - 1
- We need to use the Server.Createobject object:
<%
Set oConn = Server.Createobject("ADODB.Connection")
%>
S T E P - 2
- We can use the IsObject function to detect if we have successfully created an object.
<%
Set oConn = Server.Createobject("ADODB.Connection")
If IsObject(oConn) Then 'If the oConn is an object will be return TRUE
Response.write("Yes, we created an object.")
End If
%>
No comments:
Post a Comment