Ok this is like a two part app. One app to view details about bands gig listings; this part i have working fine. The other app is to allow bands to updae their list off gigs. This is where i am having problems. I have used UI components to make up the app interface: text input and text area and a button. The web service connection to the cfc is done with action scrip (not with the webservice connector component as I cant get this to work atall). When the button is clicked it sends the details from the text components to the cfc for it to add them to the data base. The button works fine and sends the details to the cfc. However (I think) it is when the details get to the cfc that the problem occurs. Here are the relevent scripts: This is the cffunction: <cffunction name="Insertnewgig" access="remote" returntype="string"> <cfargument name="venue" type="string" required="true"> <cfargument name="desc" type="string" required="true"> <cfargument name="entry" type="string" required="true"> <cfquery name="q_addgig" Datasource="gigs"> INSERT INTO listings (venue, desc, entry) VALUES('#venue#', '#desc#', '#entry#') </cfquery> <cfset result="Your gig has been added successfully."> <cfreturn result> </cffunction> This is the actionscript which hears the click then sends the details: var insertResponder=new Object(); insertData=function(){ gigService.Insertnewgig(insertResponder, venue_txt.text, desc_txt.text, entry_txt.text); trace("sent update"); } submit_btn.addEventListener("click", insertData); Now then, when the button is clicked (using 'test movie' and 'netconnection debugger') the following error is displayed: Status (object #2) .....code: "Server.Processing" .....description: "The argument VENUE passed to function Insertnewgig() is not of type string." .....details: "" .....level: "error" .....type: "" HOW CAN THIS BE. I am of the uderstanding that textinput and text field components automatically give out string values. I am even more confused by this info that netconnection debugger gives about what flash has sent to the cfc when "this is text from...." is typed into the text components: MethodName: "gigs.gigcomp.Insertnewgig" Parameters (object #2) .....[1]: "this is text from venue_txt" .....[2]: "this is text from desc_txt" .....[3]: "this is text from entry_txt" .....[0] (object #3) .........."[object Object]" Doesn't this mean that flash has sent string values. If so why hasn't the cfc recieved them as string values. Is there somthing I'm doing wrong or another way around it. Perhaps a completely different method is required. I would like to thank all those who have taken the time to read through this addmittedly lengthy post. I am at my witts end over this as i have spent two weeks on this task, and have tried several different ways of accomplishing it without success. This method is the closest I have gotten though i am completely baffled over this problem. Please, please help so i can get on with building the rest of my site.
doof, After having spent plenty of time recently researching the arcane incantations for getting Flash, ColdFusion, and Access to play nice together, I feel your pain. If you don't mind, send up a list of your database table structure and I will be happy to have a look. --kadman
Don't see what you're looking for? Try a search.
|