Results 1 to 2 of 2

Thread: How far does COM go in IS?

  1. #1
    AaronA Guest

    How far does COM go in IS?

    All,

    Are there only certain objects I can use with CreateObject, or can any COM object be used in IS? Here is my delema:

    I want to call a stored procedure, and retrieve an output variable from this call. The only way I see how to do this is to use Parameter Objects, and then Append them to a Command Object. Execute the Command Object, and get the Value from the OutPut Parameter. I have tried this, and got no compile errors, which I expected, but I didnt expect it to throw an exception when trying to call certain functions, or properties from my "OBJECT" variables. Does anybody know how to get an output variable this way, or another way?

    Thank you for your time,
    --Aaron

  2. #2
    Join Date
    Dec 2001
    Location
    Schaumburg, IL
    Posts
    1,279
    Aaron,

    I believe any COM Object can be used as long as it meets the following criteria:

    The CreateObject function initializes the registered COM object named by szProgID and returns a reference that can be assigned to a variable of type OBJECT by using the set keyword.

    To check whether the object was initialized successfully, you can use the keywords try–catch–endcatch for more control over exception handling for COM objects.

    The COM object must be registered on the target system in order for CreateObject to work.
    Regards,

    Joshua
    Macrovision

Posting Permissions

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