using System;
using WebApplication3.Entities.xxx;
using System.Data.OracleClient;
using WebApplication3.Untils;
using System.Data;
using System.Text;
namespace WebApplication3.Services.xxxx
{
public class MyDemoService
{
public string ReelRequestService(ReelInfo reelInfo)
{
string jsonstring = "";
//1.创建Connection连接
using (OracleConnection conn = new OracleConnectionHelperTool().getOracleConnection())
{
try
{
DataTable dt = new DataTable();
//2.设置Oracle Command命令
OracleCommand cmd = new OracleCommand();
//3.设置CommandText执行哪个语句
cmd.CommandText = "REEL_REQUEST_SP";
//4.设置CommandTypet指定执行的是存储过程
cmd.CommandType = CommandType.StoredProcedure;
//5.设置Oracle Command命令连接
cmd.Connection = conn;
//6.开启连接
conn.Open();
//7.设置输入输出参数
OracleParameter[] parametes = {
new OracleParameter("i_pkg_id",OracleType.VarChar),
new OracleParameter("i_product_no",OracleType.VarChar),
new OracleParameter("i_scan_mode",OracleType.VarChar),
new OracleParameter("o_anything",OracleType.VarChar),
new OracleParameter("o_message",OracleType.VarChar),
new OracleParameter("
C#连接Oracle数据库调用带输入输出结果的存储过程
最新推荐文章于 2022-09-27 11:16:07 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)