Home » SQL & PL/SQL » SQL & PL/SQL » pls-00306
pls-00306 [message #642] |
Mon, 25 February 2002 11:12 |
monir
Messages: 22 Registered: February 2002
|
Junior Member |
|
|
this is my procedure in my package:
CREATE OR REPLACE PACKAGE qGetDosNAs_xJEtP_DMAJ
IS
CURSOR C1 IS
SELECT DISTINCT DATE_DEBUT, DOSSIER, SEQ, DUREE, TYPE_DUREE FROM ROLES;
TYPE P_CUR IS REF CURSOR RETURN C1%ROWTYPE;
PROCEDURE qGetDosNAs_xJEtP_DMAJ_PROC
(
pDate_Derniere_MAJ IN date,
pDuree in number,
P_CURSOR IN OUT P_CUR
);
END qGetDosNAs_xJEtP_DMAJ;
/
CREATE OR REPLACE PACKAGE BODY qGetDosNAs_xJEtP_DMAJ
IS
PROCEDURE qGetDosNAs_xJEtP_DMAJ_PROC
(
pDate_Derniere_MAJ IN date,
pDuree in number,
P_CURSOR IN OUT P_CUR
)
is
BEGIN
open P_CURSOR for
SELECT DISTINCT DATE_DEBUT, DOSSIER, SEQ, DUREE, TYPE_DUREE FROM ROLES
WHERE (DATE_CREATION >= pDate_Derniere_MAJ)
AND (DOSSIER In (SELECT DOSSIER FROM DOSSIERS WHERE cause_designe = 0 AND cause_continue = 0))
AND (DUREE >= pDuree) AND (TYPE_DUREE = 'J')
ORDER BY DATE_DEBUT, DOSSIER;
END qGetDosNAs_xJEtP_DMAJ_PROC;
END qGetDosNAs_xJEtP_DMAJ;
/
but when i call it from my vb programm like that :
Public Function DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO(ByRef poRecordset As ADODB.Recordset, ByVal piDuree As Integer, ByVal pdDate_Derniere_MAJ As Date) As Boolean
'===============================================
Const csNOM_ROUTINE = "DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ"
On Error GoTo ErrHandler
'===============================================
Dim cmd As ADODB.Command
Dim prmDuree As ADODB.Parameter
Dim prmDate_Derniere_MAJ As ADODB.Parameter
DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO = False
'faire la connection
FaireConnection
' Ouvre un objet de commande à un paramètre.
Set cmd = New ADODB.Command
'APPELLE DU PROCEDURE EN ORACLE
cmd.CommandText = "qGetDosNAs_xJEtP_DMAJ.qGetDosNAs_xJEtP_DMAJ_PROC"
cmd.CommandType = adCmdStoredProc
' Obtient la valeur du paramètre et l'ajoute.
Set prmDuree = cmd.CreateParameter("pDuree", adInteger, adParamInput)
cmd.Parameters.Append prmDuree
prmDuree.Value = piDuree
Set prmDate_Derniere_MAJ = cmd.CreateParameter("pDate_Derniere_MAJ", adDate, adParamInput)
cmd.Parameters.Append prmDate_Derniere_MAJ
prmDate_Derniere_MAJ.Value = pdDate_Derniere_MAJ
' Crée un jeu d'enregistrements par exécution de la commande
Set cmd.ActiveConnection = cn
Set poRecordset = cmd.Execute
DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO = True
'===============================================
FreeObjects:
FermerCommand cmd
Exit Function
ErrHandler:
InscriptionErreurApplication err.Number, err.Description, csNOM_ROUTINE, , True
GoTo FreeObjects
'===============================================
End Function
i have the famous message :
pls-00306
any one help me pls
thanks
|
|
|
Re: pls-00306 [message #656 is a reply to message #642] |
Tue, 26 February 2002 01:59 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
PLS-00306 wrong number or types of arguments in call to name
Cause:
This error occurs when the named subprogram call cannot be matched to any declaration for that subprogram name. The subprogram name might be misspelled, a parameter might have the wrong datatype, the declaration might be faulty, or the declaration might be placed incorrectly in the block structure. For example, this error occurs if the built-in square root function SQRT is called with a misspelled name or with a parameter of the wrong datatype.
Action:
Check the spelling and declaration of the subprogram name. Also confirm that its call is correct, its parameters are of the right datatype, and, if it is not a built-in function, that its declaration is placed correctly in the block structure.
|
|
|
Re: pls-00306 [message #658 is a reply to message #642] |
Tue, 26 February 2002 02:01 |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
PLS-00306 wrong number or types of arguments in call to name
Cause:
This error occurs when the named subprogram call cannot be matched to any declaration for that subprogram name. The subprogram name might be misspelled, a parameter might have the wrong datatype, the declaration might be faulty, or the declaration might be placed incorrectly in the block structure. For example, this error occurs if the built-in square root function SQRT is called with a misspelled name or with a parameter of the wrong datatype.
Action:
Check the spelling and declaration of the subprogram name. Also confirm that its call is correct, its parameters are of the right datatype, and, if it is not a built-in function, that its declaration is placed correctly in the block structure.
|
|
|
pls-00306 AGAIN [message #705 is a reply to message #656] |
Wed, 27 February 2002 08:27 |
monir
Messages: 22 Registered: February 2002
|
Junior Member |
|
|
THIS IS MY SECOND SOS CALL FOR THIS PROBLEM PLS HELP ME
this is my procedure in my package:
CREATE OR REPLACE PACKAGE qGetDosNAs_xJEtP_DMAJ
IS
CURSOR C1 IS
SELECT DISTINCT DATE_DEBUT, DOSSIER, SEQ, DUREE, TYPE_DUREE FROM ROLES;
TYPE P_CUR IS REF CURSOR RETURN C1%ROWTYPE;
PROCEDURE qGetDosNAs_xJEtP_DMAJ_PROC
(
pDate_Derniere_MAJ IN date,
pDuree in number,
P_CURSOR IN OUT P_CUR
);
END qGetDosNAs_xJEtP_DMAJ;
/
CREATE OR REPLACE PACKAGE BODY qGetDosNAs_xJEtP_DMAJ
IS
PROCEDURE qGetDosNAs_xJEtP_DMAJ_PROC
(
pDate_Derniere_MAJ IN date,
pDuree in number,
P_CURSOR IN OUT P_CUR
)
is
BEGIN
open P_CURSOR for
SELECT DISTINCT DATE_DEBUT, DOSSIER, SEQ, DUREE, TYPE_DUREE FROM ROLES
WHERE (DATE_CREATION >= pDate_Derniere_MAJ)
AND (DOSSIER In (SELECT DOSSIER FROM DOSSIERS WHERE cause_designe = 0 AND cause_continue = 0))
AND (DUREE >= pDuree) AND (TYPE_DUREE = 'J')
ORDER BY DATE_DEBUT, DOSSIER;
END qGetDosNAs_xJEtP_DMAJ_PROC;
END qGetDosNAs_xJEtP_DMAJ;
/
but when i call it from my vb programm like that :
Public Function DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO(ByRef poRecordset As ADODB.Recordset, ByVal piDuree As Integer, ByVal pdDate_Derniere_MAJ As Date) As Boolean
'===============================================
Const csNOM_ROUTINE = "DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ"
On Error GoTo ErrHandler
'===============================================
Dim cmd As ADODB.Command
Dim prmDuree As ADODB.Parameter
Dim prmDate_Derniere_MAJ As ADODB.Parameter
DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO = False
'faire la connection
FaireConnection
' Ouvre un objet de commande à un paramètre.
Set cmd = New ADODB.Command
'APPELLE DU PROCEDURE EN ORACLE
cmd.CommandText = "qGetDosNAs_xJEtP_DMAJ.qGetDosNAs_xJEtP_DMAJ_PROC"
cmd.CommandType = adCmdStoredProc
' Obtient la valeur du paramètre et l'ajoute.
Set prmDuree = cmd.CreateParameter("pDuree", adInteger, adParamInput)
cmd.Parameters.Append prmDuree
prmDuree.Value = piDuree
Set prmDate_Derniere_MAJ = cmd.CreateParameter("pDate_Derniere_MAJ", adDate, adParamInput)
cmd.Parameters.Append prmDate_Derniere_MAJ
prmDate_Derniere_MAJ.Value = pdDate_Derniere_MAJ
' Crée un jeu d'enregistrements par exécution de la commande
Set cmd.ActiveConnection = cn
Set poRecordset = cmd.Execute
DBqGetDossierNonAssigne_xJoursEtPlus_DateMAJ_ADO = True
'===============================================
FreeObjects:
FermerCommand cmd
Exit Function
ErrHandler:
InscriptionErreurApplication err.Number, err.Description, csNOM_ROUTINE, , True
GoTo FreeObjects
'===============================================
End Function
i have the famous message :
pls-00306
any one help me pls
thanks
|
|
|
Goto Forum:
Current Time: Sat Sep 28 05:08:14 CDT 2024
|