Friday 03 Sep 2010   
Add Comment

Create Update Delete example

ColdFusion Tutorial #40

This is a tutorial for creating a simple content management system in ColdFusion. This is not a full-blown content management system, but a way to add, delete, and modify database records, which is a very common task when using ColdFusion.

demo.cfm

This is a straightforward example, just a listing of the records in the Artist Database that ships with ColdFusion 8. This the interface that allows you to add a new record, update a current record, or delete a current record.



insert_form.cfm

This is a basic form, which allows you to add a new record to the database. This form uses an action page to add the data to the database.



insert_action.cfm

The action page writes the data that was entered to the database, and you will notice the use of cfqueryparam. I would like to add that you should get into the habit of including cfqueryparam into all your forms!



update_form.cfm

This form uses an action page to modify the data from the database.



update_action.cfm

The action page modifies the data that was in the database



delete_form.cfm

This is a basic form, which allows you to delete a current record from the database. This form uses an action page to remove the data to the database.



delete_action.cfm

The action page removes the data from the database



Demo

See this code running!


Download

Download this code as a zip!


Comments

Thanks for this tutorial. I used this to create a quick app for work.
Thanks again for sharing!
Larry @ Wednesday 30 Sep 2009 - 02:14:11 AM

You are very welcome,and I am glad that you found it useful`-`
John Barrett @ Wednesday 30 Sep 2009 - 06:38:06 AM

Thanks for this article. I was doing ASP for long time and this was very helpful to quickly get on to coldfusion
V.Venkatachallam @ Friday 18 Jun 2010 - 05:06:27 PM

Hi V.Venkatachallam,
You are very welcome, and I am glad to hear that the article was helpful!
I used to do ASP many years ago too.
John Barrett @ Monday 21 Jun 2010 - 08:14:47 AM

Thank you so much. You made it nice and easy. Good work.
Jason @ Tuesday 10 Aug 2010 - 04:01:09 AM

Hi Jason, you are so welcome, I am glad you found this tutorial useful.

John Barrett @ Tuesday 10 Aug 2010 - 09:25:20 AM

this is a great tutorial for create, update, and delete. good work.
Russ @ Thursday 26 Aug 2010 - 09:58:02 AM

Hi Russ,
thanks, glad you found it useful`-`
John Barrett @ Thursday 26 Aug 2010 - 10:15:04 AM

Click button to add a comment


Author

John Barrett


Published

Monday 10 Aug 2009

Tags

cfform  cfinput  cfoutput  cfquery  cfqueryparam