
OUTPUT C# BLOQUE ANONIMO ORACLE RETONAR VALOR
Publicado por OHC (1 intervención) el 03/02/2016 15:57:14
Buenos dias a todos por favor su apoyo tengo esta funcion que me retornar un valor el la variable VALOR_RETORNAR todo ok pero al querer yo visualizar
esa informacion y pintar la respuesta en este MessageBox.Show(salida); no me trae completo todo la respuesta en esta linea les explico como deve retornarme el valor
Como debe retornar el valor:
OK|123456
Como me retorna el valor la funcion en C# .NET
OK|12
NOTA: COMO VEN SOLO ME RETORNA UNA PARTA DE ELLA Y NO ESTA COMPLETA ME APOYAN POR FAVOR.
esa informacion y pintar la respuesta en este MessageBox.Show(salida); no me trae completo todo la respuesta en esta linea les explico como deve retornarme el valor
Como debe retornar el valor:
OK|123456
Como me retorna el valor la funcion en C# .NET
OK|12
NOTA: COMO VEN SOLO ME RETORNA UNA PARTA DE ELLA Y NO ESTA COMPLETA ME APOYAN POR FAVOR.
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
30
31
32
33
string bloque_anonimo = " DECLARE
VALOR_RETORNAR VARCHAR2(500)
BEGIN
PKI_DEMO_PRUEBAS(VARIABLE1,VARIABLE2, VALOR_RETORNAR);
END; ";
try
{
OracleConnection con = new OracleConnection();
con.ConnectionString = ConnectionString;
con.Open();
OracleCommand command = new OracleCommand();
command.CommandText = bloque_anonimo;
command.Connection = con;
command.Parameters.Add("VALOR_RETORNAR", OracleType.VarChar, 2000).Direction = ParameterDirection.Output;
command.ExecuteNonQuery();
string salida = command.Parameters["VALOR_RETORNAR"].Value.ToString();
MessageBox.Show(salida);
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
Valora esta pregunta


0