November 23, 2011 at 5:29 am
I am using SP_OAMethod for executing some SQL code but it returns -2147024894
--Sample code
declare @r int --bit
, @rc int
, @com int
exec @rc = sp_OACreate 'wscript.shell', @com output;
exec @rc = sp_OAMethod @com, 'RUN', @r output, 'OSQL -Q"select 1 " -S"SERVER1" -d"DB01" -E';
select @rc
select @r
exec @rc = sp_OADestroy @com;
The sp_OAGetErrorInfo gives null for the error description.
I checked the odsole70.dll available and the same script works fine in another server. Please let me know where its missing. Thanks.
November 23, 2011 at 6:04 am
i know it's not much help, but that error number is an automation error..implying the DLL being called either does not exist or is not registered.
http://social.msdn.microsoft.com/Forums/en-US/vbinterop/thread/7c5c16d7-4029-4b6f-9a29-55a1c27718b5/
it kind of make ssense if the DLL is not registered, that it works on some servers but not on this one, but
can you make sur ethe DLL exists?
i think it is "%WINDIR%\System\ and the suite of dlls is wscript.exe, wshom.ocx, wshext.dll, wshcon.dll
Lowell
November 23, 2011 at 6:55 am
I see the DLL in the BINN folder, I also the see the other dlls you mentioned in the system folder.
When I try to register the odsole70.dll now using regsvr32 it says The module was loaded but the entry point DLLRegisterServer was not found.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply