Reads the following record (line) of a delimited text file. A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed ("\r\n"). The string that is returned does not contain the terminating carriage return or line feed.
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:
||The record has been read.
||It occurs when this function is called before calling the dfropen function, or when this call returned a value other than zero (error).
||It occurs when an error has occurred when reading a line of the delimited ASCII file. The cause may be clearly identified, enabling the trace and looking for the message with code ADF0002.
||End of data.
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(&Linetxt) // The length of the line is given by the size of the variable.
&Text = &Text + Newline() + &Linetxt
&i = DFRclose( )
&Text = "Could not open file"
Delimited ASCII files functions