Usually, you only interact with CFM pages from the browser. Those CFM pages then delegate processing to your CFCs. If you take your current model, the first step would be to move your queries into CFCs, and then invoke the CFC methods from your action page, before doing the CFLOCATION.
The general rule of thumb that I follow is that if it's a UI concern, it goes in a CFM (which might be an include, a custom tag, a UDF library, etc), but if it's a business concern, it goes in a CFC. cheers, barneyb On 7/11/07, Steve Sequenzia <[EMAIL PROTECTED]> wrote: > I am pretty new to using ColdFusion components but I am trying to start doing > all my inserts and queries with them. > > In the past I would always submit my forms to another .cfm page (usually > called action). On that page I would do my SQL inserts or whatever and then > put a <cflocation> at the bottom that directed the browser to the proper > destination page. I am not really sure if this is best practice coding but it > always worked for me. > > When using components it seems like I should be submitting the form to the > .cfc by making it the action page of the form. That all works fine and the > database inserts are working but the browser ends up on the .cfc page. I am > not sure the best way to redirect to the proper .cfm destination page. > Normally the destination page will be different depending on the source page. > > I hope this all makes sense. > > Any help on this would be greatly appreciated. > > Thanks in advance. > -- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com/ Got Gmail? I have 100 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283511 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

