Solved

Best way for Editing Details?

Posted on 2004-08-03
3
140 Views
Last Modified: 2013-12-24
Hi all,

I have a MS SQL Server table with my customers and wish to be able to edit their details with ColdFusion.

What are the best steps for this page(s) and what are the functions I should be using? What are the functions for?

Thanks in advance
0
Comment
Question by:samsung_81
3 Comments
 
LVL 17

Accepted Solution

by:
anandkp earned 300 total points
ID: 11701957
Steps wld be :

1. Select teh data in the table & show the user
<cfquery name="Qry_User" Datasource="DSNName">
    select name, lastname, email from tbl_customer where name = 'samsung' <!--- use CFQueryParam for all ur queries - helps caching & better security --->
</cfquery>

2. Show teh data in a tabular format to the user - so he can decide if he needs to edit
<cfoutput Query="Qry_User">
       #name# - #lastname# - #email#
</cfoutput>

3. when the user clicks on EDIT - again use steps 1 & 2 to show him the data - but this time in a EDITABLE format - ie with the use of TextBoxes & Form Controls.

4. the user can edit teh details [U'll need Javascript to make sure that the edits are as per the (Project/DB) requirements] by submitting the form.

5. On submit - have server validations take care of teh inputs by the user & make sure they are as per the (Project/DB) requirements. once confirmed

<CFQuery DataSource="DSNName">
    Update tbl_customer
    set    lastname = '#Form.lastname#',
            email      = '#form.email#'
    where user = 'samsung'
</CfQuery>

that shld get u started ...
0
 
LVL 35

Expert Comment

by:mrichmon
ID: 11705895
More info :

Besides what anadkp said....

You should have the users access this page over SSL and have to log in first.

Be sure to use server side validation of the submitted fields with things like regular expressions to ensure they are entering allowable data
(If you need help let us know)
0
 
LVL 1

Author Comment

by:samsung_81
ID: 11724873
thanks anandkp

but can you give some more details on steps 2-4?

im guessing from step 2 and 3, i can use the listed customer as a link with an URL variable to the "edit customer" page. correct?

with step 4, what functions other than javascript are available within coldfusion for me to edit that customer's details in a form-like view?

Thanks again
0

Featured Post

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Join & Write a Comment

Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now