Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting xml in a sp
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00838252
Message ID:
00838278
Vues:
21
This message has been marked as the solution to the initial question of the thread.
I figured it out.. I forgot to set the async property to false before I get the xml.

>Im having problems getting this working.. any ideas?
>
>
>--create procedure updateCC @zip varchar(5) as
>
>
>DECLARE @object int, @hr int
>
>EXEC @hr = sp_OACreate 'Msxml2.DOMDocument', @object OUT
>print @hr
>IF @hr <> 0
>BEGIN
>   EXEC sp_OAGetErrorInfo @object
>   RETURN
>END
>
>
>EXEC @hr = sp_OAMethod @object, 'load', null, 'http://xoap.weather.com/weather/local/54901?cc=*∏=xoap&par=&key='
>print @hr
>IF @hr <> 0
>BEGIN
>   EXEC sp_OAGetErrorInfo @object
>   RETURN
>END
>
>
>DECLARE @property varchar(8000)
>EXEC @hr = sp_OAGetProperty @object, 'xml', @property OUT
>print @hr
>IF @hr <> 0
>BEGIN
>   EXEC sp_OAGetErrorInfo @object
>   RETURN
>END
>PRINT @property
>
>EXEC @hr = sp_OADestroy @object
>IF @hr <> 0
>BEGIN
>   EXEC sp_OAGetErrorInfo @object
>   RETURN
>END
>
>
>Here is the output i get
>
>0
>Column1
>1
>
>0
>0
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform