Hi!
I use SBO 2004C. My SBO_TN executes another stored procedure (for example, 'STORED_PROC'). STORED_PROC inserts data into UDT ([@table3]) and use TRANSACTION ROLLBACK. STORED_PROC returns an error code when transaction rollback. Error code sets for @error variable which SBO_TN returns. Here is a part of SBO_TN code (simplified):
-
/...code.../
--SALES ORDER
IF @object_type = 17 and @transaction_type = 'A'
BEGIN
/...code.../
insert into [@table1]
select * from ORDR
/STORED_PROC uses data of UDT [@table1] in CURSOR operation/
exec STORED_PROC @var1,@var2,@error output
IF (select @error)<>0
set @error_message = N'Error occures'
/...code.../
END
/...code.../
-- Select the return values
select @error, @error_message
end
-
If I execute SBO_TN using Query Analyzer I`ve got no problem: @error and @error_message are returns according to my algorithm. If I try to add 'bad' Sales Order from B1 client it doesn`t notify me with error message. Sales Order seems to be added but exactly it`s not. And some DB objects are being blocked untill I close B1 client.
Please help me to understand what is the problem.
Thanx.
Dmitry.