> One question that has not yet been addressed is how would I use these bean
> and DAO objects for the master page? Or is it easier just to keep this
> procedural where I would query the database for all the Trima Records and
> output each one with a link to the form-detail page?
>
Now you are talking about a Gateway object. While the DAO deals with one
record at a time, the gateway object is responsible for many records. I
typically never want all records from a table. Instead the user will have
entered some search criteria. For example:
<cffunction name="SearchRecords">
<cfarguments name="SearchCriteria" type="struct">
<cfquery name="qGetTrimas" datasource="#variables.dsn#">
SELECT * FROM Trimas
WHERE 1=1
<cfif StructKeyExists(arguments.SearchCriteria.SerialNumber)>
AND SerialNumber LIKE <cfqueryparam
value="#arguments.SearchCriteria.SerialNumber#%">
</cfif>
<!--- ditto for other fields that are potential search fields --->
</cfquery>
</cffunction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240816
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54