Skip to Content
0
Apr 18, 2012 at 11:15 AM

Error while using B1 DI Event Services

68 Views

Hi Experts,

I am using SAP B1 DI Event Services for my addon functionality. I have downloaded the Required Server and Client installations for B1 DI Event Services. Have followed all the steps mentioned in the document attached for your reference.

We have inserted the code given below in the SBO_SP_TransactionNotification and executed the same. Now when ever i am adding any Marketing Document, I get the following error.

{code}[Microsoft][SQL Server Native Client 10.0][SQL Server]SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system{code}

SBO_SP_TransactionNotification:

@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)

AS

begin

-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'

--------------------------------------------------------------------------------------------------------------------------------

DECLARE @object int --declare the object variable
DECLARE @hresult int --declare the hresult variable
DECLARE @db_name nvarchar(120) -- database name
Select @db_name = db_name()

EXEC @hresult = sp_OACreate 'B1DIEventsSender.Profiler', @object OUT
EXEC @hresult = sp_OAMethod @object, logDb, NULL,
@db_name,
@object_type,
@transaction_type,
@num_of_cols_in_key,
@list_of_key_cols_tab_del,
@list_of_cols_val_tab_del

IF @hresult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @object
RETURN
END


--------------------------------------------------------------------------------------------------------------------------------

select @error, @error_message

end

Please request valuable suggestions.

Regards

Rohan S. Kamble