Hi all,

I am trying to switch from httpservice into remoteobject but i m having a
problem in here which i cannot figure out how to solve.

I have managed to read data using a CFC and display them in a grid (I have
really wrote my own component that I can pass SQL there and display data).
However I cannot pass parameters into the CFC and insert or update my
database. Here is my code:


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

 <mx:Script>
  <![CDATA[
   private function submitForm():void
   {
    myService.qExecQuery();
   }
  ]]>
 </mx:Script>

 <mx:RemoteObject id="myService" destination="ColdFusion" source="
GeorgeForm.cfcs.querylib"/>
  <mx:method name="qExecQuery" />
 </mx:RemoteObject>

 <mx:Button x="27" y="36" label="Button" click="submitForm();"/>


</mx:Application>

and here is a VERY simple CFC

<cfcomponent output="false">
<cffunction name="qExecQuery" access="remote">
<cfquery name="qsQuery" datasource="cfartgallery">
insert into tbl_test (firstName)
values ('FlexGeorge')
</cfquery>
<cfreturn />
</cffunction>
</cfcomponent>

When I click the button, I getr the following error:



[RPC Fault faultString="Unable to invoke CFC" faultCode="Server.Processing"
faultDetail="For details, turn on Robust Exception Information in the
ColdFusion Administrator"]
 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler
()
 at mx.rpc::Responder/fault()
 at mx.rpc::AsyncRequest/fault()
 at
::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConnectionMessageResponder::statusHandler()
 at mx.messaging::MessageResponder/status()



any ideas on how to achieve this simple task that I m trying to do?



thanks,

George

Reply via email to