Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CREATE QUEUE + Procedure_Name + parameters

8 views
Skip to first unread message

Geri Reshef

unread,
Nov 25, 2009, 3:47:24 PM11/25/09
to
How could I pass parameters to the procedure I execute through a Queue ?


Jeroen Mostert

unread,
Nov 26, 2009, 3:11:10 AM11/26/09
to
Geri Reshef wrote:
> How could I pass parameters to the procedure I execute through a Queue ?
>
You can't. Simple as that. Your procedure must have enough context to do its
work without further input. Unless you want to parameterize the queue,
everything you need to make decisions should be in the message itself. If
you do want to parameterize the queue... well, you can't. You'll need to
have separate procedures per queue. You can call a shared stored procedure
that takes the message as a parameter from within those.

--
J.

Geri Reshef

unread,
Nov 26, 2009, 3:51:22 AM11/26/09
to
I will try to send the parameters through a message!
Thank you.


Dan Guzman

unread,
Nov 26, 2009, 12:17:58 PM11/26/09
to
> I will try to send the parameters through a message!

Yes, Jeroem is spot on with this suggestion. The purpose of the message
body to to pass all of the information needed by the implementing service,
which effectively eliminates the need for separate parameters. This pattern
allows you to replace the activated stored proc with a mid-tier service
later (or visa-versa) with no application changes.

--
Hope this helps.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

0 new messages