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:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Move(
oDBFSTarget,
lIDX,
lName
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual Move(
Usual oDBFSTarget = default,
Usual lIDX = default,
Usual lName = default
)
Request Example
View SourceParameters
- oDBFSTarget (Optional)
- Type: Usual
The drive and directory to move SELF's files into. Can also be an existing DBFileSpec object. - lIDX (Optional)
- Type: Usual
Logical parameter. TRUE also moves any index files associated with SELF. The default is TRUE. - 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 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