Warning: This function is maintained for backward compatibility. It is strongly recommended to use the
File data type, its properties, and methods instead of this function.
Closes the file opened by DFROpen. This function must be called after a successful call (without error) to DFROpen.
DFRClose()
Type Returned:
Numeric
Objects: Procedure, Transaction, Web Panel, Data Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3)
This function may return some of the following values:
Value |
Result |
Description |
0 |
Successful operation |
The file has been read. |
-1 |
Wrong sequence |
It occurs when this function is called before calling the DFROpen function, or when the call to DFROpen returned a value other than zero (error). |
Samples
For this example, the parameter field separator is not required.
&Text = ""
&i = dfropen( "Test.txt",1024,,"")
If &I = 0
Do while dfrnext( ) = 0
&i = dfrgtxt(&Line) // The length of the line is given by the size of the variable.
&Text = &Text + Newline() + &Line
EndDo
&i = dfrclose( )
else
&Text = "Could not open file"
EndIf
Delimited ASCII files functions