[flexcoders] Re: ameature question but am desperate
am using access database?
[flexcoders] Re: ameature question but am desperate
when i use the following code private function insertHandler( ):void{ if (cat.selected == true) { catManager.cats( cats); } } i get the following error Unable to invoke CFC - The CAT argument passed to the cats function is not of type boolean.
re: [flexcoders] Re: ameature question but am desperate
I was getting the same CFC cannot be invoked error. What I found out, from my set up, that I was using MySQL and you cannot add a true/false to the database as a Boolean field. Its either a 1 or 0. If you create a varchar field, the code works fine. Not sure what type of DB you were using or how you set up your tables. From: Wally Kolcz wko...@isavepets.com Sent: Tuesday, August 11, 2009 10:15 AM To: flexcoders@yahoogroups.com Subject: re: [flexcoders] Re: ameature question but am desperate Ohhh I am wrong, you want to pass in a Boolean. So forget my last response. However. I still am curious about your CFC path and your CFC, itself, it returning a 'String' (returnType), but you're not returning anything after the query From: stinasius stinas...@yahoo.com Sent: Tuesday, August 11, 2009 6:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.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 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
re: [flexcoders] Re: ameature question but am desperate
Post your code for the RemoteObject, the fuction that calls the method and post your CFC. I think i can get it to work. From: stinasius stinas...@yahoo.com Sent: Monday, August 10, 2009 10:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate thats exactly what i am doing. no difference at all. when i use a textinput, and combobox, data is inserted but a checkbox is complex. so am still where i was yesterday... no progress and still the same error.
[flexcoders] Re: ameature question but am desperate
this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.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 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
re: [flexcoders] Re: ameature question but am desperate
First, cat.selected is a Boolean (True/False) You need to do a conditional to see if the check box (by id) is set to true of false to determine its value private function insertHandler():void{ if (cat.selected == true) { catManager.cats(cats); } } mx:CheckBox x=100 y=73 label=Cats id=cat/ Or use a switch/case if there are numerous check boxes. Also is the path to your CFC: www.yourwebsite.com/ chkbx_dbinsert/insert.cfc? From: stinasius stinas...@yahoo.com Sent: Tuesday, August 11, 2009 6:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.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 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
re: [flexcoders] Re: ameature question but am desperate
Ohhh I am wrong, you want to pass in a Boolean. So forget my last response. However. I still am curious about your CFC path and your CFC, itself, it returning a 'String' (returnType), but you're not returning anything after the query From: stinasius stinas...@yahoo.com Sent: Tuesday, August 11, 2009 6:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.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 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
[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.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.
RE: [flexcoders] Re: ameature question but am desperate
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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Monday, August 10, 2009 6:23 AM To: flexcoders@yahoogroups.com 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.
RE: [flexcoders] Re: ameature question but am desperate
care to guide me? --- On Mon, 8/10/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: ameature question but am desperate To: flexcoders@yahoogroups.com Date: Monday, August 10, 2009, 6:58 AM 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: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of stinasius Sent: Monday, August 10, 2009 6:23 AM To: flexcod...@yahoogro ups.com 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. 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:ResultEven t):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=handleStrin gResult(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=insertHandle r()/ /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.
RE: [flexcoders] Re: ameature question but am desperate
Is you're RemoteObject's source set to the dot note path to the CFC? And the CFC's method name is 'cat'? Mine usually looks something like mx:RemoteObject id=petDAO destination=ColdFusion source='com.isavepets.data.pet.petDAO(which is the CFC) ... mx:method name = create (function name inside the CFC) ... /mx:RemoteObject From: amanyire arthur stinas...@yahoo.com Sent: Monday, August 10, 2009 8:26 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: ameature question but am desperate care to guide me? --- On Mon, 8/10/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: ameature question but am desperate To: flexcoders@yahoogroups.com Date: Monday, August 10, 2009, 6:58 AM 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: flexcod...@yahoogro ups..com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of stinasius Sent: Monday, August 10, 2009 6:23 AM To: flexcod...@yahoogro ups.com 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. 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:ResultEven t):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=handleStrin gResult(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=insertHandle r()/ /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.
RE: [flexcoders] Re: ameature question but am desperate
Here is a done sample of one of mine: mx:RemoteObject id=discountGateway destination=ColdFusion source=com.isavepets.cfc.discounts.discountGateway fault=Alert.show(event.fault.message, event.fault.faultCode) mx:method name=listByType fault=Alert.show(event.fault.message, event.fault.faultCode) result=resultHandler(event) / /mx:RemoteObject the source equates to the root of the site/com/isavepets/cfc/discounts/discountGateway.cfc Inside my discountGateway.cfc is a function called listByType that takes a single argument ('type') I then call the function in AS like this: discountGateway.listByType(type); (type being either static or passed in as an argument) From: amanyire arthur stinas...@yahoo.com Sent: Monday, August 10, 2009 8:26 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: ameature question but am desperate care to guide me? --- On Mon, 8/10/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: ameature question but am desperate To: flexcoders@yahoogroups.com Date: Monday, August 10, 2009, 6:58 AM 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: flexcod...@yahoogro ups..com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of stinasius Sent: Monday, August 10, 2009 6:23 AM To: flexcod...@yahoogro ups.com 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. 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:ResultEven t):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=handleStrin gResult(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=insertHandle r()/ /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.
[flexcoders] Re: ameature question but am desperate
thats exactly what i am doing. no difference at all. when i use a textinput, and combobox, data is inserted but a checkbox is complex. so am still where i was yesterday... no progress and still the same error.
[flexcoders] Re: ameature question but am desperate
this is the sample code am using to insert data from flex to db using a cfc.(listProperty is the function that has the insert query in cfc). do i use cat.selected or something else? listManager.listProperty(ctry_name.selectedItem, cat.selected);
RE: [flexcoders] Re: ameature question but am desperate
If cat.selected has the data in it that you need, then use it. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Friday, August 07, 2009 10:11 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate this is the sample code am using to insert data from flex to db using a cfc.(listProperty is the function that has the insert query in cfc). do i use cat.selected or something else? listManager.listProperty(ctry_name.selectedItem, cat.selected);