Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(SQL Server) Setting a Maximum Response SizeThe MaxResponseSize property protects your spider from downloading a page that is too large. By default, MaxResponseSize = 0, which indicates that there is no maximum. You may set it to a number indicating the maximum number of bytes to download. URLs with response sizes larger than this will be skipped.
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls. -- CREATE PROCEDURE ChilkatSample AS BEGIN DECLARE @hr int DECLARE @spider int -- Use "Chilkat_9_5_0.Spider" for versions of Chilkat < 10.0.0 EXEC @hr = sp_OACreate 'Chilkat.Spider', @spider OUT IF @hr <> 0 BEGIN PRINT 'Failed to create ActiveX component' RETURN END EXEC sp_OAMethod @spider, 'Initialize', NULL, 'www.chilkatsoft.com' -- Add the 1st URL: EXEC sp_OAMethod @spider, 'AddUnspidered', NULL, 'http://www.chilkatsoft.com/' -- This example demonstrates setting the MaxResponseSize property -- Do not download anything with a response size greater than 100,000 bytes. EXEC sp_OASetProperty @spider, 'MaxResponseSize', 100000 EXEC @hr = sp_OADestroy @spider END GO |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.