PASS **** - 230 User logged in, proceed. USER - 331 User name okay, need password. PRINT 'File Uploaded!' - Here is the session log showing the XCRC command: - 220 Serv-U FTP Server v6.3 for WinSock ready. PRINT = sp_OADestroy END - If we examine the session log, we'll see the XCRC command: EXEC sp_OAGetProperty 'SessionLog', OUT SELECT = 'hamlet.xml' EXEC sp_OAMethod 'PutFile', OUT, 1 SELECT = 'hamlet.xml' DECLARE nvarchar( 4000) PRINT = sp_OADestroy END - Upload a file. EXEC sp_OAMethod 'ChangeRemoteDir', OUT, 'junk' IF 1 PRINT = sp_OADestroy END - Change to the remote directory where the file will be uploaded. DECLARE int EXEC sp_OAMethod 'Connect', OUT IF 1īEGIN EXEC sp_OAGetProperty 'LastErrorText', OUT We'll want to examine it to - see the XCRC command: EXEC sp_OASetProperty 'KeepSessionLog', 1 DECLARE int EXEC = sp_OACreate ' Chilkat_9_5_0.Ftp2', OUT IF 0 BEGIN PRINT 'Failed to create ActiveX component' RETURN END EXEC sp_OASetProperty 'Hostname', '' EXEC sp_OASetProperty 'Username', 'login' EXEC sp_OASetProperty 'Password', 'password' - Turn on the AutoXcrc property: EXEC sp_OASetProperty 'AutoXcrc', 1 See Global Unlock Sample for sample code. This example requires the Chilkat API to have been previously unlocked. Important: See this note about string length limitations for strings returned by sp_OAMethod calls.ĪS BEGIN DECLARE int DECLARE nvarchar( 4000) If you have trouble, please contact Chilkat ActiveX Downloads Note: XCRC is new functionality that is present in the pre-release downloads at, or in official new versions dated after 3. The AutoFeat property tells the FTP2 component to automatically request the FTP server features via the FEAT command after connecting. Note: In order for the FTP2 component to know whether XCRC is supported by your FTP server, you must have the AutoFeat property turned on (which is the default setting). The FTP2 Put* methods automatically do this when the AutoXcrc property is turned on. The client can then verify that the checksum matches the local file. The XCRC command asks the FTP server to send an CRC checksum (hash) for the contents of a file. If your FTP server does not support XCRC, then no XCRC command will be sent to verify the upload. XCRC is an FTP extension supported by most FTP servers. Demonstrates how to tell Chilkat FTP2 to automatically verify an upload using XCRC.
0 Comments
Leave a Reply. |