Introduction to the usage of SqlHelperParameterCache class in SqlHelper

Source: Internet
Author: User

The SqlHelper class provides three shared methods that you can use to manage SqlParameter parameters. Here are one by one explanations:

1, CacheParameterSet

Storing the SqlParameter parameter array in the local cache

2, Getcacheparameterset

Used to read the SqlParameter array in the cache, and use the CacheParameterSet combination above

3, Getspsqlparameter

An overloaded method that retrieves the corresponding parameters in the specified stored procedure (first querying the database once and then caching the results for future queries), which retrieves the parameters of the stored procedure from the cache, and if not, retrieves from the. NET SqlCommandBuilder class from the inside, and add them to the cache for subsequent retrieval requests. Then, specify the appropriate parameter settings for each parameter (set the parameter value to DBNull.Value), and finally return the parameters to the client as an array.

Introduction to the usage of SqlHelperParameterCache class in SqlHelper

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.