cancel
Showing results for 
Search instead for 
Did you mean: 

need Some info about sp_trasaction notification

Former Member
0 Kudos
299

Hi..

I need some info about sp_trasctin notification

in ohem i put one udf....actually this is varchar...

what i need is if any body addding the document..

the duplicates should not be allow..

i put this code in sp_trasction notification

but showing erros like below sp i past it error.

declare @srno as int

declare @count as int

IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '53'

BEGIN

set  @srno=(Select U_EPF from OHEM  where empID=@list_of_cols_val_tab_del)

set @count=(Select count(*) from OHEM  T0 where T0.U_EPF='@srno')

if @count>1

begin

     SET @error = 10

     SET @error_message = 'Plz enter the diff EPF Number'

end

end

error is

Msg 137, Level 15, State 2, Line 5

Must declare the scalar variable "@transaction_type".

Msg 137, Level 15, State 2, Line 9

Must declare the scalar variable "@list_of_cols_val_tab_del".

Msg 137, Level 15, State 1, Line 17

Must declare the scalar variable "@error".

Msg 137, Level 15, State 1, Line 19

Must declare the scalar variable "@error_message".

View Entire Topic
Former Member

Hi Seenu....

Seems you are directly executing this SP in Query Analyzer.

But you have to run it somewhere else.

Please fillow the followiing Path

Start-->All Programs--> Microsoft SQL Server--> SQL Server Management.

Login and Expand your DB and select Programability-->

Stored Procedure-->SBO_SP_TransactionNotification.

Right click on this and select Modify and on right hand side screen Paste your SP under text written PASTE YOUR CODE HERE

Regards,

Rahul

Former Member
0 Kudos

No..

sir i tried in the same what u said..

Before done this one i had done another sp

i got result too,

but this time error  occured..

That's why i pasted sql errors also..

ashutosh_tomar
Contributor
0 Kudos

Seenu,

Are you running your SP with selecting the text in it..  if yes.. than try to run it without any selectios.

The errors in your post are because SQL is not able to read and declare.. Variables like @@transaction_type.   Or you are trying to run your SP at wrong place..

Regards

Ashutosh T

Former Member
0 Kudos

kkk i will try...

MUCHIRAJUNIOR
Explorer
0 Kudos
I tried this and it worked, it was blocking TN