SQL Server
SQL Server
Example: Rest.AddHeader method
Demonstrates theAddHeader method.
Chilkat SQL Server Downloads
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @rest int
EXEC @hr = sp_OACreate 'Chilkat.Rest', @rest OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
EXEC sp_OAMethod @rest, 'AddHeader', @success OUT, 'User-Agent', 'MyApplication/1.0'
-- ...
-- ...
-- ...
EXEC @hr = sp_OADestroy @rest
END
GO