Home > account  [1 example]

Send account command to remote server.

 Examples

SET SERVEROUTPUT ON SIZE 1000000;
DECLARE
  fid VARCHAR2(80);
  host VARCHAR2(80)   := 'ftp.gnu.org';
  usernm VARCHAR2(80) := 'anonymous';
  passwd VARCHAR2(80) := '';
  acct   VARCHAR2(80) := 'test';
BEGIN
  fid := fclient_p.createFTPClient;

  fclient_p.conn(fid, host);

  fclient_p.username(fid, usernm);
  fclient_p.password(fid, passwd);
  fclient_p.account(fid, acct);
  fclient_p.logout(fid);
  fclient_p.remove(fid);
EXCEPTION
  WHEN fclient_p.java_failed THEN
    DBMS_OUTPUT.PUT_LINE(SUBSTR(fclient_p.getErrorWithResponse(fid), 1, 255));
END;
/

If you need to check if account is successful add the following snippet of code immediately after the call to account: IF fclient_p.getLastResponseReturnCode(fid) = '230' THEN DBMS_OUTPUT.PUT_LINE('Successfully performed Account'); ELSE DBMS_OUTPUT.PUT_LINE(SUBSTR('Failed to perform Account, Reason :'||REPLACE(fclient_p.getLastResponse(fid), CHR(10)), 1, 255)); END IF;

© 1999-2003 Bear Claw Inc.