Implementing page Pass variables in SQL Server 2005

Source: Internet
Author: User
Tags urlencode

Objective:

This example is very simple, and the main purpose of this example is to familiarize you with the creation of a SQL-complex CRL function.

In the Web page to pass variables, usually first encoded, and then decoded. In. NET implementation of this feature, very simple direct call (Microsoft has been processing completed),

It's encoded:

String Message = Server.UrlEncode("欢迎学习ASP.NET!");
Response.Redirect("WebForm2.aspx?Msg=" + Message);

It's decoding:

Label1.Text=Server.UrlDecode(Request.QueryString["Msg"]);

If you implement this method in SQL 2000, it is not easy to find the UrlEncode and UrlDecode principles, and then parse the encoding and decoding strings. (If you are interested, you can try to write down, the Internet to see the implementation of SQL 2000, there are problems.) )

SQL 2005 Implementation process:

If we use SQL 2005 to achieve such functionality, that is very convenient. The steps are described below. (as the screenshot is more intuitive, I take screenshots mainly)

One: Create a SQL Server 2005 database project, as shown in the following figure:

Two: Configure the database you want to add the CLR function to. The following figure:

Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.