Sharon,
I agree with Rick, if you can do it with a Push Fields
it would be preferable. I am not sure of your environment (or version),
but if the goal is to only update the CM_Change_Management form AND not fire any
filters on that form then you could create a filter that runs at execution level
0 that detects this situation and issues a GOTO 1000 command that skips
your workflow.
Something else to look at; does the SQL
UPDATE command not RUN or runs but not UPDATES? If it is running
then the value of @cmNumber may be blank and therefore would not update any
record. SQL Profiler can be used to verify that it is running and also
what the value of your parameter (the command that runs could actually be
update dbo.CM_Change_Management set status = 2 where Request_ID =
''). Note that if your filter [that runs the Direct SQL] fires on
Submit then the value of Request ID may be not yet be available at the time your
stored procedure is run.
Stephen
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Rick Cook
Sent: Monday, May 08, 2006 9:31 AM
To: arslist@ARSLIST.ORG
Subject: Re: Running a (MS SQL 2000 SP3) Stored Procedure 0n ARS 5.1.2 patch 1484
Why do you need to do this via a SP? Wouldn't a Push
Fields do the same thing with less overhead?
Rick
From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Menachem, Sharon
Sent: Monday, May 08, 2006 5:46 AM
To: arslist@ARSLIST.ORG
Subject: Running a (MS SQL 2000 SP3) Stored Procedure 0n ARS 5.1.2 patch 1484
I am
trying to run a stored procedure from a filter that will check one form for
status <> 3 and if it does not exist, will push a value to another
form.
After testing the stored procedure in the query analyzer I am now trying
to run it through a filter with directsql. I see that the
stored procedure runs and checks for the presence of status <> 3 but it
does not continue and run the update to the second table. Any idea why
not?
Here
is the stored procedure:
ALTER
procedure RMD_usp_Check_CM_Approvals
(
@cmNumber varchar(15)
)
(
@cmNumber varchar(15)
)
as
--begin
transaction
--commit
--rollback
--commit
--rollback
if not exists
(select status from dbo.CM_Approvals
where CM_Request_ID = @cmNumber
and
status <> 3)
(select status from dbo.CM_Approvals
where CM_Request_ID = @cmNumber
and
status <> 3)
update
dbo.CM_Change_Management
set status = 2
where Request_ID = @cmNumber
set status = 2
where Request_ID = @cmNumber
Thanks very much,
Sharon
This email message and any attachments thereto are intended only for use by the addressee(s) named above, and may contain legally privileged and/or confidential information. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the [EMAIL PROTECTED] and destroy the original message.
*********************************************************************************** __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___