Code call Stored Procedure timeout, SQL Server Management studio runs fast (improved)

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

Original article: http://blog.csdn.net/iwteih/article/details/4515267

 
Used by colleagues todayCodeThe stored procedure call times out and runs in SQL Server Management studio, but the result is very quick. This is the same as the last time I encountered it. Now the solution is recorded as follows, I would like to remind you. Solution: Delete unnecessary spaces in the stored procedure. Stunned, but this is the reality. The reality is cruel. The reality is heartless. Haha is not necessarily a space that causes timeout. Try again.

The above solution removes spaces in the stored procedure. However, if the format of the stored procedure is not very friendly, it is also very troublesome to maintain it later.

The solution is as follows: the execution is successful in the database.ProgramConstruct the following SQL statement for execution

 

Sqlparameter Param=New sqlparameter ("@ Project_id", Project_id); string selectcmd=String. Format ("ExecDBO.[* ** Get * Ro * ctco ***] @ Project_id", Project_id); dataset DS=This. executequery (commandtype.Text, Selectcmd, Param );

Upload the execution of stored procedures as an SQL statement to the database for execution.

Okay, you have to worry about it. Try it now...

 

Can Microsoft clear this bug? I hope more people can see this.Article, Less tangle

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.