par
damaskinos » 28 juil. 2010, 18:33
Je ne sais pas si je peux poster ça ici mais je me lance. 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
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
Je ne sais pas si je peux poster ça ici mais je me lance. J'ai une erreur quand j’appelle une procédure.
L’erreur :
[quote]#1312 - PROCEDURE can't return a result set in the given context[/quote]
la procedure
[sql]
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
[/sql]
J’ai beau chercher je trouve pas pourquoi. Merci d’avance pour vos suggestions