Navigation: Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:Size ====== | ![]() ![]() ![]() |
Returns or sets the size of a BLOB field. Before assigning data to the BLOB using the string slicing technique, if the BLOB does not yet contain any data you must set its size using PROP:Size. Before assigning additional data that will increase the amount of data in the BLOB (using the string slicing technique), you must reset its size using PROP:Size.
Example:
Names FILE,DRIVER('TopSpeed')
NbrKey KEY(Names:Number)
Notes BLOB !Can be larger than 64K
Rec RECORD
Name STRING(20)
Number SHORT
END
END
BlobSize LONG
BlobBuffer1 STRING(65520),STATIC !Maximum size string
BlobBuffer2 STRING(65520),STATIC !Maximum size string
WinView WINDOW('View BLOB Contents'),AT(0,0,320,200),SYSTEM
TEXT,AT(0,0,320,180),USE(BlobBuffer1),VSCROLL
TEXT,AT(0,190,320,180),USE(BlobBuffer2),VSCROLL,HIDE
END
CODE
OPEN(Names)
SET(Names)
NEXT(Names)
OPEN(WinView)
BlobSize = Names.Notes{PROP:Size} !Get size of BLOB contents
IF BlobSize > 65520
BlobBuffer1 = Names.Notes[0 : 65519]
BlobBuffer2 = Names.Notes[65520 : BlobSize - 1]
WinView{PROP:Height} = 400
UNHIDE(?BlobBuffer2)
ELSE
BlobBuffer1 = Names.Notes[0 : BlobSize - 1]
END
ACCEPT
END
See Also: