Bonjour a tous,

J'ai une erreur quand j’appelle une procédure.
L’erreur :

#1312 - PROCEDURE can't return a result set in the given context
la procedure

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
DROP PROCEDURE `BACKOFFICE_SUBMIT_PACKAGE`//
CREATE DEFINER=`root`@`localhost` PROCEDURE `BACKOFFICE_SUBMIT_PACKAGE`(
    IN iLogin VARCHAR(255),
    IN iIdParentApplication INT(10),
 
    IN iAppName VARCHAR(255),
	IN iAppType TINYINT,
    IN iAppVersion INT(11),
    IN iMetadata TEXT,
    IN iSettings TEXT,
	IN iFields TEXT,
	IN iCreationDate INT(10)
)
BEGIN
    DECLARE tidustemp  INT(10) DEFAULT 0;
    DECLARE tresult TEXT DEFAULT '<response __action="BACKOFFICE_SUBMIT_PACKAGE">';
    SELECT idUser INTO tidustemp FROM `tsf-users` WHERE login=iLogin LIMIT 1;
 
    INSERT INTO `tsf-applications`
    SET     idDeveloper=tidustemp,
            idParentApplication=iIdParentApplication,
            appName=iAppName,
            appType=iAppType,
            appVersion=iAppVersion,
            metadata=iMetadata,
            settings=iSettings,
            fields=iFields,
            creationDate = iCreationDate;
 
    SET tresult = CONCAT(tresult,'<application __idi="',TRUNCATE(RAND()*1000000000,9),'" __id="',LAST_INSERT_ID(),'" __iddev="',tidustemp,'" __name="',iAppName,'" __type="',iAppType,'" __metadata="',iMetadata,'" __settings="',iSettings,'" __fields="',iFields,'" __creationDate="',iCreationDate,'" />');
 
	SET tresult = CONCAT(tresult,'</response>');
 
    SELECT tresult;
END
J’ai beau chercher je trouve pas pourquoi. Merci d’avance pour vos suggestions