Well the first thing to determine is, is qiAdminListFileNumAdd() being called twice. Eg open up your net connection debugger and see if a call is being made twice, or on the result handler pop up an alert and see if that alerts occurs twice, etc...
My guess is that is the case. And my super wild guess is that that Canvas is being included in your app as a custom component twice. <comp:mycomp1 ../> <comp:mycomp2.../> Jeremy Rottman wrote: >I have started to develope a simple flex app using coldfusion as my >backend. While working on some of the more detailed portions of the >app. I have ran into this problem. > >On the backend, I have the coldfusion fucntion below. It is pretty >straight forward and works like a charm when I run it through a cf >page. However when I use this function from with in flex, it insert >two records into the data base. So if my listCompletePrimer was >L051234 it would insert that and the next number in order. So that I >have L051234 and L051235. > >I am using initalize to create this insertion so that I can call back >the inserted number and display it in a form field to an admin. > >Here is my as/flex/cf code. Can someone lead me to the direction of >fixing this. > >Flex: ><mx:Canvas width="100%" height="100%" >xmlns:mx="http://www.macromedia.com/2005/mxml" >initialize="qiAdminListFileNumAdd();" xmlns="*"> > >AS: >function qiAdminListFileNumAdd(){ > srv.qiAdminListFileNumAdd();} > >CF: > <cffunction name="qiAdminListFileNumAdd" access="remote" >returntype="string" output="false"> > <!--- Global File Number Manipulation Query - Sale ---> > <cfquery name="CheckNumList" datasource="#application.dsn#"> > SELECT fld_fileNum > FROM tbl_smartPanel_propInfo_List > ORDER BY fld_fileNum > DESC LIMIT 1 > </cfquery> > <cfset listPrimer = removeChars(CheckNumList.fld_fileNum, 1, >len(APPLICATION.systemInfo.fld_listPrefix) + >len(dateformat(APPLICATION.todayDate, "YY")))> > <cfset listCompletePrimer = > APPLICATION.systemInfo.fld_listPrefix & >APPLICATION.datePrimer & listPrimer + 1> > <cfquery datasource="#application.dsn#"> > insert into tbl_smartPanel_propInfo_List > (fld_fileNum) > values('#listCompletePrimer#') > </cfquery> > <cfreturn listCompletePrimer /> > </cffunction> > > > > > >-- >Flexcoders Mailing List >FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com >Yahoo! Groups Links > > > > > > > > > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

