drumsticks
Programmer
Hello,
I'm using a client software that calls a cfcomponent, essentially a web service, in which a cffunction within the cfcomponent invokes an out-of-process (exe) com component using cfobject. The issue is the action parameter equaling 'connect'.
I manually start the com exe so that it is already running on the server. When the client software connects to the web service, i receive a test statement back to tell me if the cfobject has effectively invoked the com object using connect action parameter.
Instead, it errors (not being able to find the already running com exe) and it runs a cfobject statement inside the cfcatch with the action parameter equal to create instead.
Here is the example:
<cfcomponent>
<cffunction name="testdbf2sql" hint="Test the testdbf2sql COM Object" output="true" access="remote" returntype="string">
<cfargument name="user" type="string" required="true" hint="Client Username" displayname="UserName">
<cfargument name="filename" type="string" required="true" hint="filename" displayname="FileName">
<cftry>
<cfobject action="connect" context"local" type="com" name="dbf2sql" class="dpcomobject.dpcomobject">
<cfcatch>
<cfobject action="create" context="local" type="com" name="dbf2sql" class="dpdbftosqlsvr.dpdbftosqlsvr">
<cfreturn "Failed COM">
</cfcatch>
</cftry>
</cffunction>
</cfcomponent>
Why can I not get this connect action parameter to work properly?
Regards,
Drumsticks
I'm using a client software that calls a cfcomponent, essentially a web service, in which a cffunction within the cfcomponent invokes an out-of-process (exe) com component using cfobject. The issue is the action parameter equaling 'connect'.
I manually start the com exe so that it is already running on the server. When the client software connects to the web service, i receive a test statement back to tell me if the cfobject has effectively invoked the com object using connect action parameter.
Instead, it errors (not being able to find the already running com exe) and it runs a cfobject statement inside the cfcatch with the action parameter equal to create instead.
Here is the example:
<cfcomponent>
<cffunction name="testdbf2sql" hint="Test the testdbf2sql COM Object" output="true" access="remote" returntype="string">
<cfargument name="user" type="string" required="true" hint="Client Username" displayname="UserName">
<cfargument name="filename" type="string" required="true" hint="filename" displayname="FileName">
<cftry>
<cfobject action="connect" context"local" type="com" name="dbf2sql" class="dpcomobject.dpcomobject">
<cfcatch>
<cfobject action="create" context="local" type="com" name="dbf2sql" class="dpdbftosqlsvr.dpdbftosqlsvr">
<cfreturn "Failed COM">
</cfcatch>
</cftry>
</cffunction>
</cfcomponent>
Why can I not get this connect action parameter to work properly?
Regards,
Drumsticks