
BBjFileInfo::setKeyName
Description
In BBj 6.0 and higher, this method sets the name of a VKEYED key chain.
Syntax
Return Value |
Method |
void |
setKeyName(int keynum, string keyname) |
void |
setKeyName(string oldname, string newname) |
Parameters
Variable |
Description |
keynum |
Specifies the key number. |
keyname |
Specifies the name to be associated with keynum. |
oldname |
Specifies the old key name. |
newname |
Specifies the new key name. |
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 ' Set and get the names of VKEYED key chains 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$ lock (channel) BBjFileInfo!=BBjAPI().getFileSystem().getFileInfo(channel) BBjFileInfo!.setKeyName(0,"OrderNumber") BBjFileInfo!.setKeyName(1,"Salesperson") print "KNUM=0: ",BBjFileInfo!.getKeyName(0) print "KNUM=1: ",BBjFileInfo!.getKeyName(1) end |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.