Dreamweavermx Ultradev Exploration (4-1)

Source: Internet
Author: User
Tags dreamweaver
Dreamweaver Dreamweaver MX Ultradev Exploration (4) modifying records in a database

In the previous chapter we talked about adding new content to the database. But I do not know that this is not the case, if I have a database record after the submission to find out in error? What to do? Of course we have to revise. This time we modify the contents of the database through the Web. It doesn't sound too easy. It doesn't matter, through the previous chapters of the introduction, you should find that in the DW MX call the database is very simple, as long as you click a few mouse on the line. Oh... The content of this update database is the same, very simple, let ' s go!~~!

OK, let's understand the basic concept of database content update. First of all, for example, the user data update in the 5D forum is used to update the database content. This type of page is usually the main page (front page)--The child page (the next page), the home page lets the user select the record update (the 5D forum's personal information is to let the user select Record Update), and then pass a parameter to the child page, and the child page performs two different operations. First, it shows the existing data, which can be modified by the user, and then it updates the modified database contents.

<1> first, we set up a recordset and, as we said in chapter two, use repeating domain behavior to create multiple-line records, where I don't repeat these steps. The actual effect figure is shown in (4.1).



4-1

<2> Do you notice the "edit" on the top? This is the main character of our first step-jump to the Detail page connection (go to Detail page). The previous reference is to submit a parameter to a subpage on the main page. We have this "edit" here, and when we click on it, we pass an argument to the next page. We first select the word "edit" with the mouse, and then Application-->server Behaviors-->go to Detail Page, which is also a server behavior from DW MX, as shown in figure (4-2).



4-2
A dialog screen appears as shown in figure (4-3) after clicking the mouse.

Link: You can choose which connection to use for this server behavior in this Drop-down list, and if you select dynamic content in the document, it will automatically select that content.
Detail page: Enter the URL of the ASP page for the detailed page in the text box, or click the browser button to select it. Here we enter edit.asp.
Pass URL Parameter: In this text box, enter the name of the parameter to be passed through the URL to the detail page, remember to lose a good note, in the back we have to use OH.
Recordset: Selects the recordset that the parameter belongs to by passing the URL. Which record set does it mean to pass the ginseng? Here, select the recordset named TESTMX that we created just now.
Column: Selects the name of the field in the recordset to which the parameter is passed through the URL, which sets the source of the value of the URL pass parameter. Here we choose the ID, you can also choose the other, but remember to change the Chengxiang right in the back.
URL Parameters: Indicates that the form value in the master page is passed as a URL parameter to a child page. We do not use the form on our homepage, so we can not choose it.
Form Parameters: Indicates that the form value in the master page is passed to the child page as a URL parameter. The parameters passed here can be read through the Request.Form on the subpage. Ditto, and there is no form, so do not choose. (Note: Request.Form for ASP in a basic built-in image, detailed methods, please refer to the relevant information.) )

When the OK button is clicked, the original "edit" we have selected becomes a hypertext connection that contains dynamic content.



4-3

<3> so far, the main page of the parameters passed by the preparation work has been completed, the rest? Nature is also the play of this chapter--Updating the contents of the database. Create a new page, defined as ASP, script for Vbsscript, save as edit.asp, that is, we entered on the above, do not lose the wrong oh, or you will be wrong. The next thing to do is set up a recordset, follow the main page, and then create a form to make it easier for the user to enter an updated record, as shown in figure (4-4).

As mentioned in chapter Three, also remember to set the name of the text box in the form and the consistency in the database.



4-4

Related Article

Alibaba Cloud 10 Year Anniversary

With You, We are Shaping a Digital World, 2009-2019

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.