Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-12-07 : 08:38:27
|
| Raj writes "I am trying to access a DLL from a stored procedure.The method in the DLL takes 3 parameters as input and returns a boolean value.I got the following error "0x80020006 ODSOLE Extended Procedure Unknown name". When I tried this code.DECLARE @object intDECLARE @hr intDECLARE @property varchar(255)DECLARE @x intDECLARE @src varchar(255)DECLARE @desc varchar(255)-- Create an object.EXEC @hr = sp_OACreate 'Calendaring.CalendarCalc', @object OUT IF @hr <> 0BEGIN EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc RETURNEND-- Call a method that returns a value.EXEC @hr = sp_OAMethod @object, 'IsHoliDay',@x OUTPUT,'20041225','CalendarName','c:\config.ini'IF @hr <> 0BEGIN EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc RETURNENDPRINT @x-- Destroy the object.EXEC @hr = sp_OADestroy @objectIF @hr <> 0BEGIN EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc RETURNENDAny help would be appreciatedThanks in advance." |
|
|
|
|
|
|
|