Ultradev Instance Tutorial: 3.6 Deleting records

Source: Internet
Author: User
Tags add filter insert sql
Tutorial Chapter III: Application database to create dynamic Web pages

Section sixth: Deleting Records

In the previous section, we created a connection for deletion: del.asp?id=<%= (Recordset1.Fields.Item ("id"). Value)%&gt, or a fuss about this ID.

Open the Data Bindings panel, click the "+" button, select command (Stored Procedure), and open the command panel. command, as the name suggests, is the execution of commands. The following figure. The Name column in the panel will be filled in as you wish, and the names of the commands we are going to execute. Connection is the connection we created. Type is the action you want to perform. Dropdown, we can see that there are four choices: None, Stored Procedure, Insert, Update, delete we choose to delete this command, and then Ultradev automatically generates code in the SQL column:



This is still not complete, we click Tables in database items, select the data table we want to delete operation: UserInfo, click on the right add to SQL Delete button, then the SQL column will be automatically filled in:

DELETE from Userinfo


Next we're going to add the qualifying criteria and select the data table we want to delete: UserInfo, select the field to qualify, here is the ID field, click the Where button, and the SQL column becomes:

DELETE from Userinfo


ID equals what, let's add a statement by hand. By clicking the "+" button, a blank line is generated in the variables, a name is filled in, where we use del_id and then the Run-time value is filled in: Request.QueryString ("id"). Hey, what does it mean to see a friend here to ask? In fact, as long as you're in the last section to edit the recordset in the data, after you've set the filter, click the Advanced button, and you'll see the SQL statement that Ultradev generated for us, and there's a request.querystring ("id "), which is equivalent to the URL in our filter parameter. After filling out, click OK, our delete page is generated.

Because this command panel does not provide us with a jump page option, we need to add a separate statement. Select Menu Insert-> head Tags-> Refresh

The panel settings are at a glance, so I don't have to say more:)

After adding the jump page let us Open the browser window, select the DD+DD record we just modified, click Delete Connection, see, our record is not deleted!

The next section is to do a simple query, please note.

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.