DbFileSpec.Move Method (Usual, Usual, Usual) | |
Moves and/or renames all files associated with DBFileSpec objects to a different drive and/or directory. Updates DBFileSpec and/or OrderSpec instance variables. Will also rename auto-open index files. Only DBF, MEMO and auto-open index files will get renamed.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD Move(
oDBFSTarget AS USUAL,
lIDX AS USUAL,
lName AS USUAL
) AS LOGIC
public virtual bool Move(
[DefaultParameterValueAttribute(0, 1)] Usual oDBFSTarget,
[DefaultParameterValueAttribute(0, 1)] Usual lIDX,
[DefaultParameterValueAttribute(0, 1)] Usual lName
)
Request Example
View SourceParameters
- oDBFSTarget
- Type: Usual
The drive and directory to move SELF's files into. Can also be an existing DBFileSpec object. - lIDX
- Type: Usual
Logical parameter. TRUE also moves any index files associated with SELF. The default is TRUE. - 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 1
2SetDefault("C:\CAVO25\SAMPLES\GSTUTOR")
3oDB := DBFileSpec{ }
4oDB:FileName := "customer"
5IF oDB:Find()
6oDB:Move("C:\TEST\")
7ENDIF
8
9
10SetDefault("C:\CAVO25\SAMPLES\GSTUTOR")
11oFS := FileSpec{"C:\TEST\"}
12oDB := DBFileSpec{ }
13oDB:FileName := "customer"
14IF oDB:Find()
15oDB:Move(oFS)
16ENDIF
17
18SetDefault("C:\CAVO25\SAMPLES\GSTUTOR")
19oDB := DBFileSpec{ }
20oDB:FileName := "customer"
21IF oDB:Find()
22oDB:Move("C:\TEST\NewFile")
23ENDIF
See Also