SQL Server
SQL Server
Example: Http.GenTimeStamp method
Demonstrates theGenTimeStamp 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
-- Return current date/time in the following format: Day, DD Mon YYYY HH:MM:SS GMT
DECLARE @timestamp nvarchar(4000)
EXEC sp_OAMethod @http, 'GenTimeStamp', @timestamp OUT
PRINT @timestamp
-- Sample Output:
-- Thu, 21 Aug 2025 11:17:31 GMT
EXEC @hr = sp_OADestroy @http
END
GO