Release the Oracle Stored Procedure package C # coderobot)

Source: Internet
Author: User
No, code generators are increasingly helpful to programmers. There are some excellent code tools on the Internet, such as codesmith and mygeneration. However, I have never found a tool or template that directly converts the Oracle Stored Procedure package to C #. (could anyone tell me? Thank you very much! :), So I wrote coderobot in my work, which is convenient to use. The following describes how to use it:

(1) The generated code is based on the oraclebase class (used for database shutdown and command parameter preprocessing ). Include this class in the project.
(2) The database connection string is saved in the config configuration file of the project by default, for example, <add key = "connstr" value = "Data Source = portal; user id = user; password = pass; "/>

(3) For output parameters of the string type, generate C # code similar to addmediaparamout (CMD, "p_name", oracletype. varchar, # length #);

Code, change # length # To the actual length of the corresponding field
(4) For output parameters of the cursor type, the parameter type genrefcur is ref cursor is defined in Oracle;
Procedure example (p_id int, p_cur out genrefcur );

Generate C # code: Public void example (long p_id, out oracledatareader p_cur)

(5) Use Code such as: Using (dbexample DB = new dbexample)
{
DB. func1 (..);
DB. func2 (..);
}

 

---------------------------------------------
What's new
---------------------------------------------
Ver 1. 1. * (download)
-You can use Pascal to format the function name and parameter name.
-Fixed the problem that the Oracle 10g DSN list could not be obtained.

Ver 1.0.2764 (download)
-Use icsharpcode. texteditor to display code

Ver 1.0.2448
-Added blob support.
-Simplified oraclebase

Ver 1.0.2167:
-Automatically retrieve the Oracle DSN list
-Support stored procedures (functions)
-Datareader, dataset, and able output are supported.
-Some minor bugs

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.