DFRGTxt Function
Scope
Objects: Procedures, Reports, Transactions, Web Panels, Work Panels
Languages: .NET, C/SQL, Java, Visual Basic
Interfaces: Web, Win
Purpose
Reads a character type field of the current line (read by dfrnext).
Syntax
DFRGTxt( Text [, Length])
Type Returned:
Numeric
Where:
Text
It can be an attribute or variable or character or varchar type. The read value will be stored here.
Length
It can be an attribute, variable or constant of numeric type, optional, which indicates the maximum number of characters to be read. Their value, if specified, can’t exceed the size defined for <txt>. In case it is omitted, it is assumed the size defined for the attribute or variable <txt>. If this parameter exceeds the <txt> size the results are unpredictable.
NOTE: If the parameter encoding was specified in the function DFROpen, this length means “number of bytes”.
Values
This function may return some of the following values:
0: Sucessful operation. The field has been read.
-1: Wrong sequence. It occurs when you call this function before calling the dfrnext function or the last call to dfrnext returned a value different from zero (error). If the trace is enabled you will see the ADF0004 or ADF0006 message.
-5: Wrong format. The string in the field doesn’t have a correct form. The most common cause is that the field you are trying to read is of another type (number, date, etc.). If the trace is enabled you will see the ADF0009 message.
-6: Overflow. This is a warning that indicates that the string length in the record is greater than the maximum specified (or assumed) in the <length> parameter. The value read is cut to <length> characters