BBjFileInfo::getText

Description

In BBj 6.0 and higher, this method retrieves the text value from a file associated with a BBjFileInfo object.

Syntax

Return Value

Method

string

getText()

Parameters

None.

Return Value

Returns the text value from the file associated with this BBjFileInfo object. If no text value has been set, this returns "".

Remarks

This method throws an !ERROR=13 if the file associated with this BBjFileInfo object is not a VKEYED file.

Example

rem ' Read and write the text area of a VKEYED file

filename$ = "Sample.dat"
erase filename$,err=*next
vkeyed filename$,[1:1:6]+[2:1:3],[3:1:2],0,64
channel = unt
open (channel)filename$
BBjFileInfo! = BBjAPI().getFileSystem().getFileInfo(channel)
text$="OrderNumber:C(6),LineNumber:C(3),Salesperson:c(2)"
BBjFileInfo!.setText(text$)
print "The text associated with ",BBjFileInfo!," is: "
print BBjFileInfo!.getText()
end

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.