Help on using CreateObject

Results 1 to 3 of 3

Thread: Help on using CreateObject

  1. #1
    Shimi Guest

    Default Help on using CreateObject

    I want to use CreateObject to communicate with a COM object<BR>but i need to pass parameters to the constructor while creating it.<BR>How can i do it?

  2. #2
    Join Date
    Dec 1969

    Default RE: Help on using CreateObject

    Shimi,<BR><BR>Here is some code that calls a COM object called Enroll under the StateU application.<BR> Set objEnroll = Server.CreateObject("StateU.Enroll")<BR><BR>This is how you would call a sub routine while passing parameters<BR> objEnroll.Add (classID,stuID)<BR><BR>hope this helps<BR><BR>bob

  3. #3
    Join Date
    Dec 1969

    Default RE: Help on using CreateObject

    I&#039am afraid that there cannot be any constructers in COM object.<BR>What you could do is create an instance of the com object and call the methods or functions in that.<BR><BR>set comObj = server.CreateObject("theDLLname.ClassName")<BR>cal l any function in that class as shown below.<BR>comObj.functionName("Parameters")<BR><BR >I think This&#039ll help U<BR><BR>Suraj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts