Problem with Stored Procedures after upgrade to linqconnect

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
osamaweb
Posts: 1
Joined: Mon 04 Jun 2012 13:19

Problem with Stored Procedures after upgrade to linqconnect

Post by osamaweb » Mon 04 Jun 2012 13:28

Hi..
I have a problem after upgrading to linqconnect v4.0, The stored procedure calling cause exception if it return cursor parameter.

this is the exception :
"ORA-06550: line 2, column 10:\nPLS-00306: wrong number or types of arguments in call to 'XXXXXXXX'\nORA-06550: line 2, column 3:\nPL/SQL: Statement ignored"

this problem not exist in V3.2

if anyone have idea about this problem, please let me know.
Thanks

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Re: Problem with Stored Procedures after upgrade to linqconn

Post by StanislavK » Wed 06 Jun 2012 16:08

Thank you for the report, we have reproduced the issue. We will analyze the problem and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Problem with Stored Procedures after upgrade to linqconnect

Post by MariiaI » Fri 10 Aug 2012 10:13

The fix that refers to "ORA-06550: wrong number or types of arguments" exception is available in new build of LinqConnect 4.0.63. It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=24669

sis01
Posts: 9
Joined: Thu 07 Mar 2013 16:43

Another Problem with Stored Procedures after upgrade to DOTCONNECT

Post by sis01 » Thu 07 Mar 2013 17:12

Hello!

Please need help, because I have a similar problem:


Im using dotconnect 6.60 with C# in .NET

I have an Stored Procedure in Oracle :

Code: Select all

PROCEDURE AGREGA_CC_CREDITOS(pfcorteANT IN DATE, pfechafin IN DATE) 
IS
   emesg VARCHAR2 (2500) := 'Testing';
BEGIN
     
    dbms_output.enable(1000000);
    BEGIN
       
                           
           INSERT INTO BURO.PRE_BDSALDOS 
            (FCORTE, STATUS, FUENTEBD, CLNS, CDGCLNS, CICLO, CDGCL, INICICLO, FINCICLO, CANTENTRE, PLAZO, FREQPAGOS, PAGOESP, SALDO, SDOVENCIDO,
                    NUMPAGVEN, MOP, FCIERRECTA, CVEPREVENC, CDGRG, CDGCO)
             (SELECT pfechafin, CC.STATUSCC, CC.FUENTEBD, CC.CLNS, CC.CDGNS, CC.CICLO, CC.CDGCL, CC.INICICLO, CC.FINCICLO, CC.PRCCANTENT, 
                     CC.NUMPAGOS, CC.FREQPAGOS, CC.PAGOPACCL, CC.SALDOCL, CC.SDOVENCL, CC.NUMPAGVEN, CC.PAGOACTUAL, CC.FCIERRECTA, 
                     NULL AS CVEPREVENC, VPRC.CDGRG, VPRC.CDGCO -- null as cdgrg, null as cdgco 
             FROM CIRCRED.SALDOS  CC,
                  ICARO.VW_PRC  VPRC 
             WHERE CC.FCORTE = pfcorteANT AND CC.FUENTEBD = 'ESIACOM' AND CC.STATUSCC NOT IN ('CIERR') 
                   AND CC.CLNS = VPRC.CLNS AND CC.CDGNS = VPRC.CDGCLNS AND CC.CICLO = VPRC.CICLO AND CC.CDGCL = VPRC.CDGCL);  

    EXCEPTION  
        WHEN OTHERS THEN  --  <-- Como indicar que atrapa CUALQUIER EXCEPCION SIN DEJAR QUE LA DETECTE .NET ??
        emesg := 'ERROR: ' || SQLCODE || '-' || SQLERRM ;
        DBMS_OUTPUT.PUT_LINE(emesg);
    END;    
             
END AGREGA_CC_CREDITOS;
When i execute it from TOAD or from Sqldeveloper (an oracle tool) it works fine
without any errors or exceptions.

But

This is the code im using to invoke that stored procedure from my app in C# with dotconnect

Code: Select all

//using System.Data.OracleClient;    //  --> If i use this, runs ok without exceptions!
using Devart.Data.Oracle;


      public void Agrega_CC_Creditos(DateTime pfcmesant, DateTime pffin)  // 02 -- AGREGA CREDITOS DE CC DE MES ANTERIOR
        {
            
            string connectionString = csutils.Varconst.BURO_cnstr;
            
            /* call stored procedure */
            using (OracleConnection cn = new OracleConnection(connectionString))
            {
                OracleCommand cmd = new OracleCommand("BURO.BC_CREDITOS.AGREGA_CC_CREDITOS", cn);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;

                cmd.Parameters.AddWithValue("pfcorteANT", pfcmesant);
                cmd.Parameters.AddWithValue("pfechafin", pffin);
                
                try
                {   cn.Open();
                    cmd.ExecuteNonQuery();
                    
                }
                catch (OracleException ex)
                {
                    /* handles the exception and does not ignore it */
                   string mensaje = string.Empty;
                    mensaje = ex.Message;
                    MessageBox.Show(mensaje);
                }
                finally
                {   
                    cn.Close();
                    if (cmd != null) cmd.Dispose();
                }
            }
        }
****

when i excecute it, i get an exception error like this.

ORA-01858: a non-numeric character was found where a numeric was expected\n
ORA-06512: at \"ESIACOM.INICIOREAL\", line 152\n
ORA-06592: CASE not found while executing CASE statement\n
ORA-06512: at \"ESIACOM.FECHAPERIODO\", line 129\n
ORA-06512: at \"ESIACOM.VENCIMIENTOPOST\", line 99\n
ORA-06512: at \"ESIACOM.FINPR\", line 50\n
ORA-06512: at \"BURO.BC_CREDITOS\", line 217\n
ORA-06512: at line 2"


Is there any way to IGNORE that exceptions...?

Thanks in advance...

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Another Problem with Stored Procedures after upgrade to DOTCONNECT

Post by MariiaI » Tue 12 Mar 2013 12:24

sis01 wrote: ORA-01858: a non-numeric character was found where a numeric was expected
We have answered you here http://forums.devart.com/viewtopic.php?f=1&t=26148

Post Reply