Monday, December 17, 2007

How to create an object in the web server

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: