On 12/2/05, Phillip Senn <[EMAIL PROTECTED]> wrote: > One of the benefits of doing Object Oriented is in case your database > changes (example: from SQL Server to MySQL). > > So from my limited understanding, > You would have a procedure to issue the update stmt. > Something like > Create procedure Book.PutTitle( > BOOKID AS INTEGER, > Title as VARCHAR(8000) > ) AS > (SQL Server): Update Book set yada yada yada > (MySQL): Update 'Book' set yada yada yada
I'm not understanding where this "procedure" exists/where it comes in. > So you wouldn't be issuing an update stmt from ColdFusion at all. > ColdFusion would be something like: > <cfset ReturnCode = Book.PutTitle(7,'OO baby')> Yes, but you still need to issue a query statement somewhere. I'm probably just having a disconnect with what you're saying. The way I typically do this stuff is, using your example, I'd have a Book CFC and a BookDAO CFC. The BookDAO CFC has (at its simplest) four methods: create, read, update, and delete. Each of these takes in a Book CFC as an argument. Within the create, read, update, and delete methods you'd have query or storedproc calls, and these would pull the data from the Book CFC that you pass into these methods. Matt -- Matt Woodward [EMAIL PROTECTED] http://www.mattwoodward.com ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
