Probleme avec la propriete CommandText-ProcedureStockée
Bonjour,
Pour charger le donnees en cache je me suis servi de ce tutoriel en Delphi
http://www.jcolibri.com/articles/bdd...taset_xml.html (Parties 1-2 et 3)
Par la suite j'ajoute une donne en cache sans problème.
Le problème est que quant J'essaie d'exécuter sur mon serveur FireBird une procédure sotckée INSERTARTICLE qui attend 4 parametres en entée via le composant TIBClentDataSet
Code:
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
| SET TERM ^ ;
CREATE OR ALTER PROCEDURE INSERTARTICLE (
nom varchar(20),
prix double precision,
stockactuel integer,
stockmini integer)
as
BEGIN
/* PROCEDURE TEXT */
INSERT INTO ARTICLES (/*ID,*/NOM, PRIX, STOCKACTUEL,STOCKMINIMUN)
VALUES(
--gen_id( gen_art, 1) ,
:NOM ,
:PRIX,
:STOCKACTUEL,
:STOCKMINI
);
-- commit
SUSPEND;
END^
SET TERM ; ^
GRANT INSERT ON ARTICLES TO PROCEDURE INSERTARTICLE;
GRANT EXECUTE ON PROCEDURE INSERTARTICLE TO SYSDBA; |
sous BCB je fais ceci
Citation:
void __fastcall TForm1::BtAjoutClick(TObject *Sender)
{
IbSgbd->IBClientDataSet->AppendRecord( ARRAYOFCONST(( NULL,Edit1->Text,Edit2->Text,
Edit3->Text,Edit4->Text )));
IbSgbd->IBClientDataSet->ApplyUpdates(-1) ; //decheche l'evenement BeforeApplyUpdates
}
Code:
1 2 3 4 5 6 7 8 9
|
void __fastcall TIbSgbd::IBClientDataSetBeforeApplyUpdates(TObject *Sender,
OleVariant &OwnerData)
{
IBClientDataSet->Close();
IBClientDataSet->CommandText="execute procedure INSERTARTICLE('un article',8,8,8)";
IBClientDataSet->Execute();
IBTransaction->Commit();
} |
J'ai comme message d'erreur "Instruction SQL vide"
Ma procédure tourne sans pb sous IBExpert
Je ne voie pas comment faire.....
merci de votre aide