SQL Server
SQL Server
Example: Http.GetDomain method
Demonstrates theGetDomain 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 @http int
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @domain nvarchar(4000)
EXEC sp_OAMethod @http, 'GetDomain', @domain OUT, 'https://chilkatsoft.com/refdoc/csharp.asp'
PRINT @domain
-- Output: chilkatsoft.com
EXEC @hr = sp_OADestroy @http
END
GO