Super simple: Use Visual Studio to automatically generate stored procedures

Source: Internet
Author: User
Tags management studio sql server management sql server management studio sql server express

Tools used:

Microsoft Visual Studio team System 2008 (Express)

Web SQL Server express 2005

Step 1:

Right-click the app_code folder, select "Add new item...", and select dataset. The dataset name does not matter, but you must keep it in mind.

Step 2:

Right-click the XSD form and select "add, tableadapter... "

Step 3:

Wait a few seconds and the "choose your data connection" form appears. Select or create a connection and click "Next ".

Step 4:

Here is the key: on the "choose a command type" form, select "create new stored procedures" and click "next ."

Step 5:

Enter an SQL SELECT statement for a single table and click "next ."

Step 6:

The "create the Stored Procedures" form appears. Rename the stored procedure as a meaningful Name:

Step 7:

You can see the "Wizard results" form and click "finish" multiple times to create the stored procedure.

Step 8:

Delete the. XSD File Created in step 1 from the app_code directory. This step is not necessary:

 

You can see the stored procedure in SQL Server Management studio.

The generated stored procedure is very clear and you can modify it as needed. This is more convenient than self-writing.

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.