Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

send a name to Oracle and get ID back from my procedure

$
0
0

I want to send a name to Oracle and get ID back from my procedure.  Please provide me a method that will work, my app is using Oracle.ManagedDataAccess. 

The found two methods that both do NOT work, both give me error "ORA-06502: PL/SQL: numeric or value error: character"

CREATE OR REPLACE PROCEDURE P_PERSON_ADD (
P1_FIRST_NAME VARCHAR2,
P1_LAST_NAME VARCHAR2,
ID_OUT OUT VARCHAR2)

First Method

cmd.Parameters.Add("ID_OUT ", OracleDbType.Varchar2).Direction = ParameterDirection.Output;

Second Method

cmd.Parameters.Add(
 new OracleParameter()
 {
 ParameterName = "ID_OUT",
 DbType = DbType.String,
 Direction = ParameterDirection.Output
 }


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>