How to Use DbHelperSQL to call a stored procedure

Source: Internet
Author: User

/// <Summary>
/// Obtain the dataset
/// </Summary>
/// <Param name = "tblName"> table name </param>
/// <Param name = "RetColumns"> columns to be returned. The default value is all. </param>
/// <Param name = "orderparts"> name of the sorting field </param>
/// <Param name = "PageSize"> page size </param>
/// <Param name = "PageIndex"> page number </param>
/// <Param name = "IsCount"> total number of returned records. If the value is not 0, return </param>
/// <Param name = "OrderType"> set the sorting type. If the value is not asc, the sorting type is descending. </param>
/// <Param name = "strWhere"> query condition (Note: Do not add where) </param>
/// <Returns> dataset </returns>
Public static SqlDataReader Get_DataReader (string tblName, string RetColumns, string orderader, int PageSize, int PageIndex, int IsCount, string OrderType, string strWhere)
{
IDataParameter [] parameters = new SqlParameter [8];
Parameters [0] = new SqlParameter ("@ tblName", SqlDbType. NVarChar, 255); // table name
Parameters [1] = new SqlParameter ("@ RetColumns", SqlDbType. NVarChar, 1000); // columns to be returned, all by default
Parameters [2] = new SqlParameter ("@ ordereter", SqlDbType. NVarChar, 255); // sort field name
Parameters [3] =

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.