GetObject Function
Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE


The GetObject function is used to access an automation object in a file and to assign that object to a object variable. Gives a reference to an ActiveX object from a file. The GetObject function is used to access an ActiveX object from a file and assign the object to an object variable. Use the Set statement to assign the object returned by Get Object to the object variable.

The Syntax of the GetObject function is :-

GetObject([pathname][,class])

Its Description is :-

Parameter Description
pathname Optional. The full path and name of the file that contains the automation object. If this parameter is omitted, the class parameter is required
class Optional. The class of the automation object. This parameter uses this syntax: appname.object type

It has two Argumentory Options :-

Part Description
appname Required; String. Name of the application providing the object.
objectype Required; String. Type or class of object to create.

Example#1 :-

Code :-
<% thepath = "C:\subdirectory\myobject.txt" %>
<% Set myobject = GetObject(thepath) %>
<% Set myobject = GetObject(thepath, "MyApplication.SomeObject") %>
 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641