No, it won't be. You have to pass it as an argument to the second method call.
On Mon, Dec 29, 2008 at 7:39 PM, Rick Faircloth <[email protected]>wrote: > I've got one method that inserts a record and then I > use LAST_INSERT_ID() to return the record ID so I can > process images and put their values into another table, > using the LAST_INSERT_ID() as a foreign key. > > To this point, I've just processed the images on the .cfm > page after the insert method completes and returns the ID. > > However, now I'm using a method in the component, "properties.cfc", > to insert the property information, then another method in a different > component, "image_processing.cfc", to process and insert the images. > > My question is this: > > If I return the LAST_INSERT_ID() from the first method, will that > variable be available to reference when I invoke the method to > process images in the second component? > > First Method in properties.cfc: > > <cfinvoke component = > "fortstewart-sm.components.properties" > method = "add_rental_property" > argumentCollection = "#form#" > returnVariable = "qGetPropertyID" <--- This is the > LAST_INSERT_ID() > dsn = "#application.dsn#"> > > Second Method in image_processing.cfc: > > <cfinvoke component = > "forstewart-sm.components.image_processing" > method = "add_rental_images" > argumentCollection = "#form#" > dsn = "#application.dsn#" > property_id = "#qGetPropertyID#"> <--- Will this > be correct? > > Thanks, > > Rick > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317248 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

