O'Reilly logo

Object-Oriented Programming in ColdFusion by Matt Gifford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Data Access Object

For our introduction into Data Access Objects, we'll create a small application to query, read, and update a database table containing information on users; this could be applied to a real-world example such as a login form, or a user management console.

We will be accessing the data from a table within our database, called tbl_Users, which contains relatively basic information for each entry. Here, you can see a UML diagram of the User.cfc bean, which has been created to reflect the columns and interact with the values from the table.

Creating a Data Access Object

You can see from the UML diagram that we have a getter/accessor method for each property ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required