Using ODAC in WebApplication

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
hello people.

Ive a problem.
I use an oracle driver "ODAC" in my proyect, I have a Stored procedure (SP) in Oracle package , this SP have a four parameter: 3 imput parameters and 1 output parameter.
the imput parameters are : Name varchar2, rut varchar2 and listanueva as type arraysampleid is VARRAY(200) of NUMBER;

my code:
when I run this, I get an error: Invalid parameter bindingrnParameter :"listanueva"

<div style="color:black; background-color:white
<pre> <span style="color:blue using (OracleConnection conn = <span style="color:blue new OracleConnection(<span style="color:#a31515 "User Id=user;Password=pass;Data Source=ORCL"))
{
conn.Open();


OracleCommand command = conn.CreateCommand();
command.CommandType = CommandType.StoredProcedure;

command.CommandText = <span style="color:#a31515 "INFO_DATOSPERSONA_5.ObtenerDatosPersona";
command.Parameters.Add(<span style="color:#a31515 "listanueva", OracleDbType.Array , idPersonas, ParameterDirection.Input);
<span style="color:green //command.Parameters["listanueva"].CollectionType = OracleCollectionType.PLSQLAssociativeArray;

command.Parameters.Add(<span style="color:#a31515 "Nombre", OracleDbType.Varchar2, <span style="color:#a31515 "Texto", ParameterDirection.Input);
command.Parameters.Add(<span style="color:#a31515 "rut", OracleDbType.Varchar2, <span style="color:#a31515 "19", ParameterDirection.Input);

command.Parameters.Add(<span style="color:#a31515 "CursorDatosPersona", OracleDbType.RefCursor, ParameterDirection.Output);

OracleDataReader reader = command.ExecuteReader();
<span style="color:blue while (reader.Read())
{
<span style="color:blue var dd = reader;
}

reader.Close();
conn.Close();
}
[/code]

<br/>

in my oracle SP:

Package:


<div style="color:black; background-color:white
<pre><span style="color:blue create <span style="color:blue or <span style="color:magenta replace package INFO_DATOSPERSONA_5 <span style="color:blue AS
<span style="color:blue TYPE rtnCursor <span style="color:blue IS REF <span style="color:blue CURSOR;

<span style="color:blue type arraysampleid <span style="color:blue is VARRAY(200) <span style="color:blue of NUMBER; <span style="color:green -- arreglo de enteros
<span style="color:blue PROCEDURE ObtenerDatosPersona(CursorDatosPersona OUT rtnCursor,
listanueva arraysampleid,
Nombre <span style="color:blue in VARCHAR2,
Rut <span style="color:blue in varchar2);

<span style="color:blue end INFO_DATOSPERSONA_5;
[/code]

My SP:

<div style="color:black; background-color:white
<pre><span style="color:blue create <span style="color:blue or <span style="color:magenta replace package body INFO_DATOSPERSONA_5 <span style="color:blue AS

<span style="color:blue PROCEDURE ObtenerDatosPersona
(
CursorDatosPersona OUT rtnCursor,
listanueva arraysampleid,
Nombre <span style="color:blue in varchar2,
Rut <span style="color:blue in varchar2
) <span style="color:blue AS

.
.
.
.
.
[/code]



by, an thanks for your replies.

<span style="font-family:arial,sans-serif; font-size:24px <span title="Haz clic para obtener otras posibles traducciones sorry <span title="Haz clic para obtener otras posibles traducciones if <span title="Haz clic para obtener otras posibles traducciones this
is not <span title="Haz clic para obtener otras posibles traducciones going <span title="Haz clic para obtener otras posibles traducciones here<span title="Haz clic para obtener otras posibles traducciones .


<
Soy arcenett<br/>

View the full article
 
Back
Top