Calling VB6 function from javascript in ASP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sipho

    Calling VB6 function from javascript in ASP

    Hi,

    I need to instantiate a VB6 function and call it from javascript in
    ASP.

    <script language='javas cript'>
    function onScheduleTask( ) {
    var ocuScheduler
    ocuScheduler = new ActiveXObject(" CCUtility.CU_Sc heduledTaskQueu e")

    ocuScheduler.Ad dScheduledTask( SCHEDTASKTYPE_P OLLEDQUEUED)
    }

    </script>

    looking at the code above :
    ->("CCUtility.CU _ScheduledTaskQ ueue") is a VB6 function running under
    COM+
    ->ocuScheduler.A ddScheduledTask (SCHEDTASKTYPE_ POLLEDQUEUED)- here I'm
    trying to call that function passing a parameter.

    I get an error message when I try to execute the code : "Automation
    server can't create object"

    Please help.
  • Paul R

    #2
    Re: Calling VB6 function from javascript in ASP

    Sipho wrote:[color=blue]
    > Hi,
    >
    > I need to instantiate a VB6 function and call it from javascript in
    > ASP.
    >
    > <script language='javas cript'>
    > function onScheduleTask( ) {
    > var ocuScheduler
    > ocuScheduler = new ActiveXObject(" CCUtility.CU_Sc heduledTaskQueu e")
    >
    > ocuScheduler.Ad dScheduledTask( SCHEDTASKTYPE_P OLLEDQUEUED)
    > }
    >
    > </script>
    >
    > looking at the code above :
    > ->("CCUtility.CU _ScheduledTaskQ ueue") is a VB6 function running under
    > COM+
    > ->ocuScheduler.A ddScheduledTask (SCHEDTASKTYPE_ POLLEDQUEUED)- here I'm
    > trying to call that function passing a parameter.
    >
    > I get an error message when I try to execute the code : "Automation
    > server can't create object"
    >
    > Please help.[/color]
    If this is an ASP function, you want Server.CreateOb ject() instead of
    new ActiveXObject() .

    Comment

    Working...