DbFileSpec.Rename Method (Usual, Usual) | |
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:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Rename(
oDBFSNewName AS USUAL,
lName AS USUAL
) AS LOGIC
public virtual bool Rename(
[DefaultParameterValueAttribute(0, 1)] Usual oDBFSNewName,
[DefaultParameterValueAttribute(0, 1)] Usual lName
)
Request Example
View SourceParameters
- oDBFSNewName
- Type: Usual
The new name for the DBF file. - lName
- 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:
Logic
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