ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: ADO :: ADO CopyRecord Óë MoveRecord ·

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

ADO CopyRecord Óë MoveRecord ·


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:1097 :: ::

CopyRecord
CopyRecord [¸´ÖƼǼ]

The CopyRecord method copies a file or directory to another location.
CopyRecordµÄ×÷ÓÃÊÇ£º½«Ò»¸öÎļþ»òĿ¼¸´ÖƵ½ÆäËüµÄµØÖ·ÖС£

MoveRecord
MoveRecord [ÒÆ¶¯¼Ç¼]

The MoveRecord method moves a file or directory to another location.
MoveRecordµÄ×÷ÓÃÊÇ£º½«Ò»¸öÎļþ»òÄ¿Â¼ÒÆ¶¯µ½ÆäËüµÄµØÖ·ÖС£

Note: The ParentURL property will not be automatically updated. You must close the Record and then open it again with the new URL.
×¢Ò⣺ParentURLÊôÐÔ²»»á×Ô¶¯¸üС£Äã±ØÐëÏȹرռǼ£¬È»ºóÔÙÓÃÒ»¸öеÄURL´ò¿ªËü¡£

Syntax
Óï·¨

CopyRecord(src,dest,username,psword,opt,async)
MoveRecord(src,dest,username,psword,opt,async)

Parameter²ÎÊý DescriptionÃèÊö
src Optional. The URL of the file or directory that will be copied/moved
¿ÉÑ¡²ÎÊý¡£Ö¸Ê¾ÐèÒª±»¸´ÖÆ/ÒÆ¶¯µÄÎļþ»òĿ¼µÄURL
dest Optional. The URL to the location where src will be copied/moved
¿ÉÑ¡²ÎÊý¡£Ö¸Ê¾ÐèÒª½«src¸´ÖÆ/ÒÆ¶¯µ½¾ßÌ嵨µãµÄURL
username Optional. The user ID that authorizes access to dest
¿ÉÑ¡²ÎÊý¡£·ÃÎÊdestµÄÊÚȨÓû§ID
psword Optional. The password that verifies username
¿ÉÑ¡²ÎÊý¡£·ÃÎÊdestµÄÊÚȨÓû§ÃÜÂë
opt For CopyRecord: Optional. A CopyRecordOptionsEnum value that specifies the behavior of this method. Default is adCopyUnspecified
CopyRecord:¿ÉÑ¡²ÎÊý¡£ÓÃÓÚÖ¸¶¨Method[·½·¨]¾ßÌåÌØÐÔµÄÒ»¸öCopyRecordOptionsEnumÖµ¡£Ä¬ÈÏֵΪadCopyUnspecified

For MoveRecord: Optional. A MoveRecordOptionsEnum value that specifies the behavior of this method. Default is adMoveUnspecified
MoveRecord:¿ÉÑ¡²ÎÊý¡£ÓÃÓÚÖ¸¶¨Method[·½·¨]¾ßÌåÌØÐÔµÄÒ»¸öMoveRecordOptionsEnumÖµ¡£Ä¬ÈÏֵΪadMoveUnspecified

async Optional. A Boolean value that, when True, sets this operation to be asynchronous
¿ÉÑ¡²ÎÊý¡£Ö¸¶¨Ò»¸öÂß¼­Öµ¡£µ±ÎªTrueʱ£¬Éè²Ù×÷½ø³ÌÉèÖÃΪ²»Í¬²½²Ù×÷


CopyRecordOptionsEnum Values

Constant
³£Á¿
Value
Öµ
Description
ÃèÊö
adCopyUnspecified -1 Default. Will not allow over write or recursive copy
ĬÈÏÖµ¡£²»ÔÊÐí¸²¸Ç»òµÝ¹é¸´ÖÆ
adCopyOverWrite 1 Overwrites the file/directory if it already exists
ÔÊÐí¸²¸ÇÏÖÓеÄÎļþ/Ŀ¼
adCopyNonRecursive 2 Copies the current directory (none of its subdirectories) to the destination (this operation is not recursive)
½«µ±Ç°Ä¿Â¼£¨Æä×ÓĿ¼³ýÍ⣩¸´ÖƵ½Ä¿±êĿ¼£¨¸ÃÏî²Ù×÷ÊDz»¿ÉµÝ¹éµÄ£©
adCopyAllowEmulation 4 Requests that the provider attempt to simulate the copy. If the attempt to copy the Record fails because the destination URL is on a different server or serviced by a different provider than the source, this may cause data loss
ÇëÇó¼¼ÊõÌṩ¶ÔÏó[provider]³¢ÊÔα¸´ÖÆ¡£Èç¹û¼Ç¼¸´ÖÆÊ§°Ü£¬ËµÃ÷Ä¿±êURLλÓÚ²»Í¬µÄ·þÎñÆ÷£¬»òÕßÊÇÓɲ»Í¬µÄ¼¼ÊõÌṩ¶ÔÏó[provider]Ìṩ·þÎñµÄ£¬Õâ¿ÉÄܵ¼ÖÂÊý¾Ý¶ªÊ§


MoveRecordOptionsEnum Values

Constant
³£Á¿
Value
Öµ
Description
ÃèÊö
adMoveUnspecified -1 Default. Will not overwrite any file/ directory at the destination location. Will also update links
ĬÈÏÖµ¡£²»¿ÉÒÔ¸²¸ÇÄ¿±êµØÖ·ÖÐÈκÎÒ»¸öÎļþ/Ŀ¼£¬µ«ÈÔ¿ÉÒÔ¸üÐÂÁ¬½Ó
adMoveOverWrite 1 Overwrites the file/directory if it already exists
ÔÊÐí¸²¸ÇÏÖÓеÄÎļþ/Ŀ¼
adMoveDontUpdateLinks 2 Modifies the default behavior of MoveRecord method by not updating the links of the source Record. The default behavior depends on the capabilities of the provider
²»Í¨¹ý¸üÐÂÔ´¼Ç¼µÄÁ¬½Ó¶ø¶ÔMoveRecordµÄĬÈÏÌØÐÔ½øÐÐÐ޸ġ£¸ÃĬÈÏÌØÐÔÊÇÓɼ¼ÊõÌṩ¶ÔÏó[provider]µÄ¾ßÌ幦Äܾö¶¨µÄ
adMoveAllowEmulation 4 Requests that the provider attempt to simulate the move. If the attempt to move the Record fails because the destination URL is on a different server or serviced by a different provider than the source, this may cause data loss
ÇëÇó¼¼ÊõÌṩ¶ÔÏó[provider]³¢ÊÔα¸´ÖÆ¡£Èç¹û¼Ç¼¸´ÖÆÊ§°Ü£¬ËµÃ÷Ä¿±êURLλÓÚ²»Í¬µÄ·þÎñÆ÷£¬»òÕßÊÇÓɲ»Í¬µÄ¼¼ÊõÌṩ¶ÔÏó[provider]Ìṩ·þÎñµÄ£¬Õâ¿ÉÄܵ¼ÖÂÊý¾Ý¶ªÊ§

ÆÀÂÛ (0) All