Hmmm...

Try this:
<cfset bRet = oUser.addAdminACE(#Attributes.ConnectString#,
#int(attributes.conID)#)>

Sometimes the loose typing of CF conflicts with other languages that
have more stringent typing requirements. Int() effectively casts your
value as a a numerical datatype. It's not uncommong for a a CF
"numerical" value is being seen as a string by other
languages/environments.

I'm not sure if this is helpful because you're using a COM object and
not a Java object, but javaCast() might work too... it would take a
little experimentation to see if javaCast() can help a COM object when
the COM object is expecting an Int value.

Hope that helps. If it doesn't, check the liveDocs
(http://livedocs.macromedia.com) under the CF version you use. The
Functions can be viewed by category, and one of the categories is
"View Functions by category"
(http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/functio2.htm#wp3532194)
and you can look under conversion or mathematical.

Good luck!

J


On Sat, 12 Mar 2005 18:44:55 -0600, Eric Hoffman
<[EMAIL PROTECTED]> wrote:
> Here's a weird one:
> 
> I am attempting to update a com object.  If I use cold fusion variables in my 
> call as designed:
> <cfset bRet = oUser.addAdminACE(#Attributes.ConnectString#, 
> #attributes.conID#)>
> 
> I get an error.
> 
> If I replace the second variable with any integer it works.
> 
> <cfset bRet = oUser.addAdminACE(#Attributes.ConnectString#, 65)>
> 
> When I cfoutput I get the correct connectstring variable and the second 
> variable actually is 65!  What gives?
> 
> This is the exact error:
> 
> Error casting an object of type to an incompatible type. This usually 
> indicates a programming error in Java, although it could also mean you have 
> tried to use a foreign object in a different way than it was designed.
> 
> I don't understand....CF should be outputting an integer there.  Manually 
> done, it works.  CF'ed no.  Cfoutput shows the same number as I put in 
> manually.  Is there some trick to it?
> 
> Thanks.
> 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198561
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to