This is me again. I have another problem with UniDirect 3.
I'm still trying to migrate our application that was using CoreLab.UniDirect to dotconnect Universal 3
Our application was working well with the following piece of code. But when I want to use it with dotConnect Universal 3 an Oracle error is thrown.
Are you aware of this kind of problem ? Is there a different way to call the stored procedure ?
And what is the change in Unidirect that can lead to this error (Transaction ?) ?
Regards.
Original Source Code :
Code: Select all
UniConnection Connexion = new UniConnection(UtSrv.ChaineConnexion);
UniCommand alert = new UniCommand();
alert.Connection = Connexion;
alert.ParameterCheck = true;
alert.CommandType = System.Data.CommandType.StoredProcedure;
alert.CommandText = "PR_ALERT_WAIT";
alert.Parameters["NAME"].Value = alerter;
alert.Parameters["TIMOUT"].Value = timeout;
alert.ExecuteNonQuery();
Code: Select all
UniConnection Connexion2 = new UniConnection(UtSrv.ChaineConnexion);
Connexion2.Open();
Connexion2.BeginTransaction();
UniCommand alert2 = new UniCommand("PR_ALERT_WAIT",Connexion2);
alert2.CommandType = System.Data.CommandType.StoredProcedure;
alert2.ParameterCheck = true;
alert2.Parameters.Add("NAME", UniDbType.VarChar);
alert2.Parameters.Add("TIMOUT", UniDbType.Decimal);
alert2.Parameters.Add("STATUS", UniDbType.Int);
alert2.Parameters["NAME"].UniDbType = UniDbType.VarChar;
alert2.Parameters["TIMOUT"].UniDbType = UniDbType.Decimal;
//alert2.Parameters["STATUS"].UniDbType = UniDbType.Int;
//alert2.Parameters["STATUS"].Direction = System.Data.ParameterDirection.Output;
alert2.Parameters["NAME"].Value = alerter;
decimal timout = (decimal) timeout;
alert2.Parameters["TIMOUT"].Value = timout;
result = alert2.ExecuteNonQuery();
Connexion2.Commit();
Code: Select all
create or replace
PROCEDURE "PR_ALERT_WAIT" (
NAME in varchar2,
STATUS out integer,
TIMOUT in number
)
as
mess varchar2(120);
begin
sys.DBMS_ALERT.WAITONE( get_user() || '_' || NAME, mess, STATUS, TIMOUT );
end;
à Devart.Data.Universal.UniCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3, Boolean A_4)
à Devart.Data.Universal.UniCommand.ExecuteNonQuery()
Error message :
ORA-20000: ORU-10023: error 3 on lock request.
ORA-06512: à "SYS.DBMS_ALERT", ligne 319
ORA-06512: à "MSTOR.PR_ALERT_WAIT", ligne 9
ORA-06512: à ligne 2