I don't know CF or do much RemoteObject, but I do not see where you are
passing in the "cat" argument value.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of stinasius
Sent: Monday, August 10, 2009 6:23 AM
To: [email protected]
Subject: [flexcoders] Re: ameature question but am desperate

 

  

still no progress. here is my code please help on what i shld do.

"chk.mxml"

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml>
com/2006/mxml" layout="absolute">

<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.controls.Alert;

public function handleStringResult(event:ResultEvent):void{ 
onCompleteHandler();
}

private function onCompleteHandler():void{
Alert.show("Congratulations!");
}

private function insertHandler():void{
catManager.cats(cat.selected); 
} 
]]>
</mx:Script>

<mx:RemoteObject id="catManager" destination="ColdFusion"
source="chkbx_dbinsert.insert" showBusyCursor="true">
<mx:method name="cats" result="handleStringResult(event)"
fault="mx.controls.Alert.show(event.fault.faultString)"/>
</mx:RemoteObject>

<mx:CheckBox x="100" y="73" label="Cats" id="cat"/>
<mx:Button x="100" y="99" label="Insert" click="insertHandler()"/> 
</mx:Application>

"insert.cfc"

<cfcomponent>
<cffunction name="cats" access="remote" returntype="string">
<cfargument name="cat" type="boolean" required="no"/>
<cfquery name="regCat" datasource="cats">
INSERT INTO cats(cat)
VALUES("#arguments.cat#")
</cfquery>
</cffunction>
</cfcomponent>

i get the following error when i try to insert the value of the chk box into
the database 

"Unable to invoke CFC - Error Executing Database Query."



Reply via email to