Shelly: According to this reference:
http://download.macromedia.com/pub/coldfusion/documentation/using_frmx_with_cfmx.pdf a recordSet cannot be sent to the CF server. The way I've sent data to a CFC on the server that updates a record in my table (or inserts a new record) is to pass each column value as an argument when I call the CFC. The CFC then has an argument for each column and I can use those arguments in my query. Within Flash, you can use the getItemAt(index) RecordSet method to get a specific row of data in your recordset. Then just use column name to access the value stored in that particular column of the recordSet. For example: Answers is a recordset object created within Flash var currentAnswers = Answers.getItemAt(0) ; (you could use a loop to get each record) call the CFC to insert the record into the table: service.insertAnswers( currentAnswers.question1, currentAnswers.question2) Another method to use Flash and CF together and update your tables is explained by Ben Forta in this article: http://www.macromedia.com/devnet/mx/coldfusion/articles/dc_wizard.html There are several new components in Flash MX 2004 Professional that can make the job of using Flash as the front end and CFC as the back end easier. Ben Forta's article gives a good run through and includes a working example that adds records to a database based on user input into a Flash component. The new Flash components use the concept of a "delta packet" (which is an XML file) to maintain user changes to the recordSet (updates, deletes, adds). A CFC can receive this "delta packet" as a string, process it using CF XML commands, and execute queries to update, delete, and add records to the tables. There is even a way to return information back to Flash so Flash can update its components (for example with the correct record id after an insert was done by the CFC on the server). Good luck with your work. Bruce Phillips Bruce Phillips Society of Teachers of Family Medicine 1-800-274-2237 ext 5405 [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 06/04/04 6:04 PM >>> Hi, I have a Flash application in which a RecordSet is created. Using Flash Remoting the appliation connects to a cfc and I want to transfer the RecordSets in order to update/insert into a database table. The connection is working and "something" is being transfered. However, there isn't any data in the Structure of the cfc. The documentation that I've found only shows string data being passed from Flash. My question: Is it possible to send a RecordSet or Object from Flash to a cfc or do I really have to send data as a string? The following code works without error, but the value inserted into the table is "No Data". action script code... myService.setAvailableData(res, SendData); cfc code... <cffunction name="setAvailableData" access="remote" returntype="string"> <cfargument name="SendData" required="yes"> <cfif StructIsEmpty(SendData)> <cfset Records = "No Data"> </cfif> <cfquery name="SetAvail" datasource="IntranetSupportTest"> insert into SC_FlashOutput (Test) values ('#Records#') </cfquery> <cfset ReturnString = "The Data was received"> <cfreturn ReturnString> </cffunction> Thanks, Shelley ========================================================= Kansas City ColdFusion User Group's website & listserv is hosted through the generous support of Clickdoug.com To send email to the list, email [EMAIL PROTECTED] To (un)subscribe, email [EMAIL PROTECTED] with your request. For hosting solutions http://www.clickdoug.com Featuring Win2003 Enterprise, RedHat Linux, CFMX 6.1. ======================================================
