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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Calling Webservice with sp_OAMethod

Author  Topic 

ssehovic
Starting Member

1 Post

Posted - 2010-11-19 : 11:29:37
I am trying to explore some geocode services from Google using T-SQL and sp_OAMethod. I am running into a problem when a respones (xml) is longer (i guess over 8000 char). I tried to use varchar(8000) or xml to get the response: EXEC @Result = sp_OAGetProperty @Obj, 'responseXML.xml', @Response OUT. In first case I get the following error: [-2147211489: ODSOLE Extended Procedure; The source data specified for this string or binary column or parameter is too long] and in second case (xml / varchar(max)) [Procedure Error in srv_convert.].

Is there a known way around this - well except writing a CLR function.

Samir

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-11-19 : 12:04:58
The only way I can think of is to write your own ActiveX/OLE object that can properly encapsulate the results and return them to SQL Server in a way it can accept. Otherwise CLR is probably your best option. FWIW SQL Server will continue to support CLR and will likely phase out OLE Automation support in a future release.
Go to Top of Page
   

- Advertisement -