sp_OACreate, ODSOLE Extended Procedure, The system cannot find the file specified.
From: Peter Vanopulos (peter_at_ibc.com.au)
Date: 11/19/04
- Next message: Tony Fonager: "Re: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied."
- Previous message: Ed: "RE: another newbie question"
- Next in thread: oj: "Re: sp_OACreate, ODSOLE Extended Procedure, The system cannot find the file specified."
- Reply: oj: "Re: sp_OACreate, ODSOLE Extended Procedure, The system cannot find the file specified."
- Messages sorted by: [ date ] [ thread ]
Date: 18 Nov 2004 21:37:26 -0800
Hello,
I have been trying to resolve an issue when calling a COM component
method via the sp_OACreate stored procedure.
CREATE PROCEDURE dbo.pmpsp_Test
@message as nvarchar(250)
AS
-- Scratch variables used in the script
DECLARE @retVal INT
DECLARE @comHandle INT
DECLARE @errorSource VARCHAR(8000)
DECLARE @errorDescription VARCHAR(8000)
DECLARE @retString VARCHAR(100)
-- Initialize the COM component.
EXEC @retVal = sp_OACreate 'com.test.TestClass', @comHandle OUTPUT
IF (@retVal <> 0)
BEGIN
-- Trap errors if any
EXEC sp_OAGetErrorInfo @comHandle, @errorSource OUTPUT,
@errorDescription OUTPUT
SELECT [Error Source] = @errorSource, [Description] =
@errorDescription
RETURN
END
-- Call a method into the component
EXEC @retVal = sp_OAMethod @comHandle, 'HelloWorkd', @retString
OUTPUT, @param=@messageIF (@retVal <> 0)
BEGIN
-- Trap errors if any
EXEC sp_OAGetErrorInfo @comHandle, @errorSource OUTPUT,
@errorDescription OUTPUT
SELECT [Error Source] = @errorSource, [Description] =
@errorDescription
RETURN
END
-- Print the value returned from the method call
SELECT @retString
-- Release the reference to the COM object
EXEC sp_OADestroy @comHandle
GO
The following error is produced by the sp_OACreate call:
ODSOLE Extended Procedure
The system cannot find the file specified.
Since the COM component is registed by running the regasm tool over
the .net assembly I have attempted to strong name the .net assembly.
The outcome was that the sp_OACreate call worked only the first time
with subsequent calls producing the following error:
ODSOLE Extended Procedure
This question was unresolved in a thread within
microsoft.public.sqlserver.security.
http://groups.google.com.au/groups?q=sp_OACreate+The+system+cannot+find+the+file+specified.&hl=en&lr=&selm=Xns94413DDDCCD9Yazorman%40127.0.0.1&rnum=2
Advice on resolving this issue would be much appreciated.
Thanks,
Pete
- Next message: Tony Fonager: "Re: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied."
- Previous message: Ed: "RE: another newbie question"
- Next in thread: oj: "Re: sp_OACreate, ODSOLE Extended Procedure, The system cannot find the file specified."
- Reply: oj: "Re: sp_OACreate, ODSOLE Extended Procedure, The system cannot find the file specified."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|