title: SQL Server - sp_OAGetProperty returns nothing
body: <p>I have the below code that calls a link and it return some information in a <code>json</code> structure:</p>
  
  <pre><code>DECLARE 
  @Object INT, 
  @vResponseText varchar(8000),
  @CountryInfo varchar(8000),
  @GetCountryRequest AS varchar(8000)= 
  '{   
     "userName":"200900119",
     "password":"8481774916"
  }'
  
  
  
  EXEC sp_OACreate 'MSXML2.ServerXMLHTTP', @Object OUTPUT
  
  EXEC sp_OAMethod @Object, 'Open', NULL, 'POST', 'https://api.dpd.ro/v1/location/country/642', 'false'
  EXEC sp_OAMethod @Object, 'SETRequestHeader', null, 'Content-Type', 'application/json'
  EXEC sp_OAMethod @Object, 'Send', NULL, @GetCountryRequest
  EXEC sp_OAMethod @Object, 'responseText', @vResponseText OUTPUT
  
  EXEC sp_OADestroy @Object
  
  PRINT @vResponseText 
  </code></pre>
  
  <p>So far so good! If I would like to insert the response into a table and then use <code>JSON_QUERY</code> to manipulate the data, I need to insert it into a table (a global temporal table in my case), using GetProperty method, which is not working.</p>
  
  <pre><code>IF OBJECT_ID('tempdb.dbo.##CountryTable', 'U') IS NOT NULL
  BEGIN
        DROP TABLE ##CountryTable
  END
  
  CREATE TABLE ##CountryTable(
  CountryInfo varchar(8000)
  )
  
  INSERT ##CountryTable (CountryInfo)
  
  EXEC sp_OAGetProperty @Object, 'responseText' 
  
  EXEC sp_OADestroy @Object
  </code></pre>
  
  <p>What am I missing? Thanks</p>