Release NBearLite v1.0.0 beta-fully supports SQL Server, Oracle, MySql, and PostgreSql database Stored Procedure Call code generation (C #/VB. NET)

Source: Internet
Author: User

Update NBearLite to v1.0.0.6 beta

Fully supports SQL Server, Oracle, MySql, and PostgreSql database Stored Procedure Call code generation (C #/VB. NET) and various parameter types such as input, output, and return.

Sub Query is supported.

Save able/DataRow is supported.



Use nbearlite.querycolumnsgenerator.exe and specify the target database type and connection string. The generated Stored Procedure Call code is similar to the following:

1 public static System. Data. DataSet SalesByCategoryTest (NBearLite. Database db, out int RETURN_VALUE, string CategoryName, string OrdYear, ref string OutP ){
2 if (db = null )){
3 throw new System. ArgumentNullException ("db", "Parameter: db cocould not be null! ");
5 NBearLite. StoredProcedureSection spSection = db. StoredProcedure ("SalesByCategoryTest ");
6 System. Collections. Generic. Dictionary <string, object> outValues;
7 spSection. SetReturnParameter ("RETURN_VALUE", System. Data. DbType. Int32, 0 );
8 spSection. AddInputParameter ("CategoryName", System. Data. DbType. String, CategoryName );
9 spSection. AddInputParameter ("OrdYear", System. Data. DbType. String, OrdYear );
10 spSection. AddInputOutputParameter ("OutP", System. Data. DbType. String, 5, OutP );
11 System. Data. DataSet ds = spSection. ToDataSet (out outValues );
12 RETURN_VALUE = (int) (outValues ["RETURN_VALUE"]);
13 OutP = (string) (outValues ["OutP"]);
14 return ds;

Example of calling this Code:

Int ret =-1;
String outStr = "";
DataSet ds = Northwind. SalesByCategoryTest (db, out ret, "test1", "1997", ref outStr );

The stored procedure SalesByCategoryTest contains four parameters: two inputs, one output (corresponding to the out parameter), one input and output parameter (corresponding to the ref parameter), and one DataSet.

For more information about NBearLite, visit: Workshop.

Appendix: NBearV4 advance notice and collection of development team members

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: 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.