|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Store Procedure - how works
Hi to all, this is my first thread ad I hope can someone help me (sorry for my english but I'm italian).
I wrote the store procedure below (at the end) and it works well. instead receiving the output parameters I wrote this before the suspend sentence (now the output params are variables): update job_position set totale_corsi_pos = :tot_tutti, totale_obbligatori = :tot_obbligatori where id = :id_jp; but I receive this error: "Too many concurrent executions of the same request." why? I can not understand the reason. Soomeonr may help me please? Thank's Boss ======== begin /* Corsi */ select count(A.obbligatorio), sum(a.obbligatorio) from abilitazioni A, abilitazioni_corsi C where (A.id_job_position = :id_jp) and (c.id_abilitazione = a.id) into :CONTO_CORSI_TOTALI, :CONTO_CORSI_OBB; /* Procedure */ select count(P.obbligatorio), sum(P.obbligatorio) from abilitazioni A, abilitazioni_procedure p where (A.id_job_position = :id_jp) and (p.id_abilitazione = a.id) into :conto_proc_totali, :conto_proc_obb; tot_tutti = :conto_corsi_totali + :conto_proc_totali; tot_obbligatori = :conto_corsi_obb + :conto_proc_obb; suspend; end |
|
#2
|
|||
|
|||
|
SUSPEND should only be used in select-able procedures. If you just execute this procedure, don't use it.
When and how is this procedure used? From a trigger perhaps? Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Store Procedure - how works |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|