BBjFileInfo::setText

Description

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

Syntax

Return Value

Method

void

setText(string text)

Parameters

Return Value

Method

text

Specifies the text to be associated with this file.

Return Value

None.

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.