Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFOBJECT issue... a challenge

Status
Not open for further replies.

drumsticks

Programmer
Jun 5, 2004
18
0
0
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top