-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcedumientoSalidaCursor.aspx.cs
More file actions
29 lines (28 loc) · 1.09 KB
/
ProcedumientoSalidaCursor.aspx.cs
File metadata and controls
29 lines (28 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using Newtonsoft.Json;
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace EjemplosOracle
{
public partial class salida_cursor : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string connectionString = ConfigurationManager.ConnectionStrings["CONEXION"].ConnectionString;
string queryString = "APPS.PRUEBA_NET.salida_cursor";
OracleDataAdapter sqladapter = new OracleDataAdapter(queryString, connectionString);
OracleParameter p1 = new OracleParameter("p_cursor", OracleDbType.RefCursor, direction: ParameterDirection.Output);
sqladapter.SelectCommand.Parameters.Add(p1);
sqladapter.SelectCommand.CommandType = CommandType.StoredProcedure;
DataSet x = new DataSet();
sqladapter.Fill(x);
Response.Write(JsonConvert.SerializeObject(x, Formatting.Indented));
}
}
}