Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 28th, 2006, 01:50 PM
ilboss ilboss is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 ilboss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 54 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old September 29th, 2006, 01:30 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Store Procedure - how works


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway