EXEC @hResult = sp_OAMethod @objectID, 'send', null, @requestBody
IF @hResult <> 0
BEGIN
EXEC sp_OAGetErrorInfo @objectID, @source OUT, @desc OUT
SELECT hResult = convert(varbinary(4), @hResult),
source = @source,
description = @desc,
FailPoint = 'Send failed',
MedthodName = @methodName
goto destroy
When I Call a web service Through Sp IN SQl Server In Above Mention I'm getting error as Shown In The Pics
-
Well it looks like you can't connect to the server right? are you sure it works when you call it from outside sql server (like using soapui)?Tom V– Tom V2016年10月06日 14:22:04 +00:00Commented Oct 6, 2016 at 14:22
-
@TomV Yes you are Right Suppose in Case If My Server service is not Started how can I send request from Sql with out such errorAlfaiz Ahmed– Alfaiz Ahmed2016年10月07日 05:06:04 +00:00Commented Oct 7, 2016 at 5:06
-
1If your server isn't running I don't understand how you could send a request to it without errorTom V– Tom V2016年10月07日 08:24:07 +00:00Commented Oct 7, 2016 at 8:24
-
OK Is Their Any Alternative How Can I Save The Data Whose Sending is getting FailAlfaiz Ahmed– Alfaiz Ahmed2016年10月07日 08:36:21 +00:00Commented Oct 7, 2016 at 8:36
1 Answer 1
Not sure about that exact error, but I would advise against using the OLE Automation stored procedures (i.e. sp_OA*
) as they have been deprecated since SQL Server 2005 was released and have various "issues".
I you need to interact with a Web Service, your best bet is to use SQLCLR. I have more info regarding this option in the following answer, also here on DBA.SE:
Explore related questions
See similar questions with these tags.