I'm using this code to enter data into table, but error uppear.
void getTextData(string oConn, int ID, string Ime, string Prezime)
{
try
{
using (OracleConnection connection = new OracleConnection(oConn))
{
OracleCommand command = new OracleCommand("HRVOJE_INSERT");
command.Connection = connection;
try
{
connection.Open();
}
catch (Exception ex)
{
}
if (command.Connection.State == ConnectionState.Open)
{
command.CommandText = "HRVOJE_INSERT";
command.Parameters.Add(ID.ToString(), OracleDbType.Int32, 16);
command.Parameters.Add(Ime, OracleDbType.Varchar2);
command.Parameters.Add(Prezime, OracleDbType.Varchar2);
command.ExecuteReader();
}
}
saved = true;
}
catch (Exception x)
{
errorM = x.Message + x.StackTrace;
}
}
store procedure:
PROCEDURE HRVOJE_INSERT
(
ID number,
Ime varchar,
Prezime varchar
)
AS
BEGIN
INSERT INTO HRVOJE_TEST (ID,IME,PREZIME) VALUES(ID,Ime,Prezime);
END;
COMMIT;
void getTextData(string oConn, int ID, string Ime, string Prezime)
{
try
{
using (OracleConnection connection = new OracleConnection(oConn))
{
OracleCommand command = new OracleCommand("HRVOJE_INSERT");
command.Connection = connection;
try
{
connection.Open();
}
catch (Exception ex)
{
}
if (command.Connection.State == ConnectionState.Open)
{
command.CommandText = "HRVOJE_INSERT";
command.Parameters.Add(ID.ToString(), OracleDbType.Int32, 16);
command.Parameters.Add(Ime, OracleDbType.Varchar2);
command.Parameters.Add(Prezime, OracleDbType.Varchar2);
command.ExecuteReader();
}
}
saved = true;
}
catch (Exception x)
{
errorM = x.Message + x.StackTrace;
}
}
store procedure:
PROCEDURE HRVOJE_INSERT
(
ID number,
Ime varchar,
Prezime varchar
)
AS
BEGIN
INSERT INTO HRVOJE_TEST (ID,IME,PREZIME) VALUES(ID,Ime,Prezime);
END;
COMMIT;