This article is a mirror article of machine translation, please click here to jump to the original article.

View: 36156|Reply: 1

[Source] .net/c# ado.net executes stored procedures with return values

[Copy link]
Posted on 4/2/2020 10:47:35 AM | | |
Stored procedures are precompiled SQL statements stored on the database server. With stored procedures, powerful tasks can be stored and run directly in the database. Stored procedures are syntactically checked and compiled when the first application is executed, and the compiled version is saved in the cache. Stored procedures can improve performance and consistency when performing repetitive tasks. Since stored procedures can perform a series of operations on the database server, it can reduce the load on the web server and improve the performance of the entire system.

1. Create a stored procedure with a return value


2.ado.net Invoke a stored procedure


Possible anomalies

Procedure or function 'xx' expects parameter '@Status', which was not supplied.

Error causes:

  • There is a problem with the order in which stored procedure parameters are called
  • Write ParameterDirection.Output as ParameterDirection.ReturnValue






Previous:Win10 shutdown There are currently no power options available
Next:Database master-slave latency leads to inaccurate query resolution
 Landlord| Posted on 4/10/2020 1:31:21 PM |
Querying the data through a stored procedure, the data is returned to the Datatable, which has been tested

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com