martinpriebe
Erfahrenes Mitglied
Hallo,
ich kämpfe gerade mit der Verbindung zu einer Oracle Datenbank.
Ich habe eine Stored Procedure.
create or replace
PROCEDURE SP_SELECTKH
(
Khid out NOCOPY VARCHAR2,
ort out NOCOPY VARCHAR2 ,
bundesland out NOCOPY VARCHAR2
)AS
BEGIN
Select Khid, Ort, Bundesland into Khid, ort, bundesland
from Krankenhaus;
END SP_SELECTKH;
Diese rufe ich aus dem Code heraus auf.
OracleConnection orCon = new ....
orCon.Open();
OracleCommand orCom = new OracleCommand();
orCom.CommandText = "sp_SelectKH";
orCom.CommandType = CommandType.StoredProcedure;
orCom.Connection = orCon;
orCom.Parameters.Add("Id", OracleDbType.NVarchar2, ParameterDirection.Output);
orCom.Parameters.Add("Ort", OracleDbType.NVarchar2, ParameterDirection.Output);
orCom.Parameters.Add("Bundesland", OracleDbType.NVarchar2, ParameterDirection.Output);
OracleDataAdapter oda = new OracleDataAdapter(orCom);
DataTable dt = new DataTable();
oda.SelectCommand.Connection = orCon;
oda.Fill(dt);
orCon.Close();
Nur ich bekomme den Fehler ORA-06502.
Ich weiß leider nicht weiter. Google hat mir leider nicht weiter geholfen.
danke im vorraus !
ich kämpfe gerade mit der Verbindung zu einer Oracle Datenbank.
Ich habe eine Stored Procedure.
create or replace
PROCEDURE SP_SELECTKH
(
Khid out NOCOPY VARCHAR2,
ort out NOCOPY VARCHAR2 ,
bundesland out NOCOPY VARCHAR2
)AS
BEGIN
Select Khid, Ort, Bundesland into Khid, ort, bundesland
from Krankenhaus;
END SP_SELECTKH;
Diese rufe ich aus dem Code heraus auf.
OracleConnection orCon = new ....
orCon.Open();
OracleCommand orCom = new OracleCommand();
orCom.CommandText = "sp_SelectKH";
orCom.CommandType = CommandType.StoredProcedure;
orCom.Connection = orCon;
orCom.Parameters.Add("Id", OracleDbType.NVarchar2, ParameterDirection.Output);
orCom.Parameters.Add("Ort", OracleDbType.NVarchar2, ParameterDirection.Output);
orCom.Parameters.Add("Bundesland", OracleDbType.NVarchar2, ParameterDirection.Output);
OracleDataAdapter oda = new OracleDataAdapter(orCom);
DataTable dt = new DataTable();
oda.SelectCommand.Connection = orCon;
oda.Fill(dt);
orCon.Close();
Nur ich bekomme den Fehler ORA-06502.
Ich weiß leider nicht weiter. Google hat mir leider nicht weiter geholfen.
danke im vorraus !