DbFileSpec.Rename Method | |
Renames files associated with DBFileSpec object. Only DBF/MEMO and auto-open index files will get renamed.
Rename() will not rename a file if it is already open or there is a file name conflict.
To rename files to another directory, use the Move() method and supply a different target file name.
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Rename(
oDBFSNewName,
lName
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public override Usual Rename(
Usual oDBFSNewName = default,
Usual lName = default
)
Request Example
View SourceParameters
- oDBFSNewName (Optional)
- Type: Usual
The new name for the DBF file. - lName (Optional)
- Type: Usual
Logical parameter. TRUE causes an auto-rename of the target file if a file conflict occurs during the move. The default is FALSE.
Return Value
Type:
Usual
TRUE if successful; otherwise, FALSE.
Examples 1SetDefault("C:\CAVO2x\SAMPLES\GSTUTOR")
2oDB := DBFileSpec{ }
3oDB:FileName := "customer"
4IF oDB:Find()
5IF !oDB:Rename("NewFile", TRUE )
6
7ENDIF
8ENDIF
See Also