I'm having issues getting a Taskcentre trigger to work in my iMIS database. The trigger is failing when it has to create an instance of an OLE object (sp_OACreate). I confirmed that the public DB role has execute permissions on sp_OACreate. This code is autogenerated by Taskcentre v4. It fails on creating this object and therefore doesn't get to my custom code. Any suggestions?
EXEC @hresult = sp_OACreate 'iwsqlea.sqlconnector', @sqlconnector OUT
IF @hresult <> 0
GOTO Quit
EXEC @hresult = sp_OAMethod @sqlconnector, 'Init', NULL, 36, 708, 6
IF @hresult <> 0
GOTO Quit
EXEC @hresult = sp_OAMethod @sqlconnector, 'RunTask', NULL
IF @hresult <> 0
GOTO Quit
END
Quit:
IF @hresult <> 0
BEGIN
SELECT @errmsg = 'Trigger on "Activity" failed to Queue Task 36(' + CAST(@hresult AS varchar(16)) + ')'
EXEC master..xp_logevent 70000, @errmsg, ERROR
END
Mark Pellicore
Some questions ...
What error message(s) are you getting?
What version of SQL do you have, Standard or Express?
Have you enabled OLE Automation?