I can't pinpoint why your code is not working. Here is what I found when I used CF to
access my COM object.
First, I found that I had problems trying to pass parameters to my method. Instead I
created properties on the object and set those. Then I would call the method without
any parameters. Second, I didn't use the <CFSCRIPT> tag. Third, you need to make
sure you object will allow the Coldfusion service user to launch your object. In our
case we created a domain user called "CFServiceUser" and had the CF services run as
this user. This allows us to give that user security rights in the domain so our CF
pages can access what they need.
Here is a snippet of the code I used in accessing my COM object. I create the object,
set 2 properties (cINIFile and uGroup) then call the rGetRatingsforGroup method.
<CFOBJECT TYPE="COM"
NAME="CustRateTemp"
CLASS="custratetempbus.custratetempbus"
ACTION="CREATE">
<CFSET CustRateTemp.cINIFile = #APPLICATION.INIFile#>
<!--- Get Minimum Score List --->
<CFSET CustRateTemp.uGroup = #APPLICATION.MinScoreCode#>
<CFSET loMinScores = CustRateTemp.rGetRatingsforGroup>
I hope this helps!
Bill Grover
Supervisor, IS
EU Services, Inc.
649 N Horners Ln
Rockville MD 20850
Phone: 301-424-3300 x396
FAX: 301-424-3300 x1396#
E-Mail: [EMAIL PROTECTED]
WWW: www.euservices.com
--------- Original Message ---------------------
Date: Wed, 23 Aug 2000 23:17:57 -0700
From: "Tom Kim" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Subject: Using COM with CF
Message-ID: <[EMAIL PROTECTED]>
Hi,
I'm new to CF and am using version 4.5.1 of both Studio and Server. I have a
COM object that returns a generated integer value. I can use this COM object
in any COM enabled Windows app. However, when I try to use in a cfm page I
get the following error:
An error occurred while evaluating the expression:
oASIWeb.SetDataPath("E:\InetPub\wwwroot\SolidData\Data");
oASIWeb.SetDatabase("sdweb");
RetVal = oASIWeb.NewID("USERS");
Error near line 4, column 4.
The symbol you have provided (oASIWeb.SetDataPath) is not the name of a
function.
Built-in functions in ColdFusion have names with no qualifiers, i.e., no
periods (.) in them.
It appears that CF thinks I'm trying to run one of its functions. My CF code
is as follows:
<CFOBJECT TYPE="COM" NAME="oASIWeb" CLASS="asiweb.asiweb" ACTION="CREATE">
<CFSCRIPT>
oASIWeb.SetDataPath("E:\InetPub\wwwroot\SolidData\Data");
oASIWeb.SetDatabase("sdweb");
RetVal = oASIWeb.NewID("USERS");
</CFSCRIPT>
<CFOUTPUT>#RetVal#</CFOUTPUT>
Am I missing something? Do I need to give the IUSR_MachineName account the
proper security access? If yes, what? Thanks --Tom
============================
Tom Kim
Advanced Systems Integration
949-261-5476
949-261-0426 Fax
[EMAIL PROTECTED]
============================
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.