> >If you want to bypass DatabaseBlocks.cfc for add, edit, and delete forms, > >just modify your action pages such that you keep the ValidateForm and > >ValidateInput custom tag calls, but replace the InsertRecord, UpdateRecord, > >or DeleteRecord custom tags and their associated child tags with the > >invocation call to your stored procedure. > > Regarding this approach, I assume the best way back to the list is just > using a cflocation call immediately following the invocation call, a la > > <cfscript> > // Insert record if validation is passed > Application.Aircraft.InsertAircraft(Form.Aircraft, Form.Comments); > </cfscript> > <cflocation > url="#Application.urlRoot#/admin/aircraft/aircraftlist.cfm?refresh=1">
That's the way we intend for people to do this. I should have been more thorough by mentioning this. > The generated SPs appear to be working good so far for single table > updates. Do you guys have plans to generate SPs for more complex > forms? If not, in the examples you are working on for the help file, it > would be useful to see examples of invoking SPs on add/edit forms that > have chooser controls on them. I have a couple forms with these and I > would be interested to see how you would handle this. That's too far outside of the scope of the Plum Help. We might put it in a KnowledgeBase article, though. You'd basically have to pass the list of primary keys in a string, then parse, cast, and loop within the SP, and everything would have to be carefully controlled using BEGIN TRANSACTION, ROLLBACK TRANSACTION, and COMMIT TRANSACTION within the SP to ensure that the many-to-manies all worked. Respectfully, Adam Phillip Churvis Member of Team Macromedia Advanced Intensive Training: * C# & ASP.NET for ColdFusion Developers * ColdFusion MX Master Class * Advanced Development with CFMX and SQL Server 2000 http://www.ColdFusionTraining.com Download CommerceBlocks V2.1 and LoRCAT from http://www.ProductivityEnhancement.com The ColdFusion MX Bible is in bookstores now!
